TextMetrics.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  7. class TextMetrics {
  8. constructor(text) {
  9. _defineProperty(this, "width", 0);
  10. _defineProperty(this, "actualBoundingBoxLeft", 0);
  11. _defineProperty(this, "actualBoundingBoxRight", 0);
  12. _defineProperty(this, "fontBoundingBoxAscent", 0);
  13. _defineProperty(this, "fontBoundingBoxDescent", 0);
  14. _defineProperty(this, "actualBoundingBoxAscent", 0);
  15. _defineProperty(this, "actualBoundingBoxDescent", 0);
  16. _defineProperty(this, "emHeightAscent", 0);
  17. _defineProperty(this, "emHeightDescent", 0);
  18. _defineProperty(this, "hangingBaseline", 0);
  19. _defineProperty(this, "alphabeticBaseline", 0);
  20. _defineProperty(this, "ideographicBaseline", 0);
  21. this.width = text.length;
  22. }
  23. }
  24. exports.default = TextMetrics;