| 1676 | } |
| 1677 | class d extends c { |
| 1678 | constructor(e3) { |
| 1679 | super(), this._optionsService = e3, this._canvas = new OffscreenCanvas(100, 100), this._ctx = this._canvas.getContext("2d"); |
| 1680 | const t3 = this._ctx.measureText("W"); |
| 1681 | if (!("width" in t3 && "fontBoundingBoxAscent" in t3 && "fontBoundingBoxDescent" in t3)) throw new Error("Required font metrics not supported"); |
| 1682 | } |
| 1683 | measure() { |
| 1684 | this._ctx.font = `${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`; |
| 1685 | const e3 = this._ctx.measureText("W"); |