@mlightcad/mtext-renderer 0.10.9 → 0.10.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -10
- package/dist/index.umd.cjs +6 -6
- package/dist/mtext-renderer-worker.js +10 -10
- package/lib/index.d.ts +1 -0
- package/lib/shxParser.d.ts +9 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24352,7 +24352,7 @@ class nf {
|
|
|
24352
24352
|
);
|
|
24353
24353
|
}
|
|
24354
24354
|
processStack(e, r, n, a, i) {
|
|
24355
|
-
const [s, o, c] = e, u = this._hOffset, h = this._vOffset, p = this._currentContext.charTrackingFactor.value, l = this.
|
|
24355
|
+
const [s, o, c] = e, u = this._hOffset, h = this._vOffset, p = this._currentContext.charTrackingFactor.value, l = this.currentFontSize, g = this._currentContext.fontSizeScaleFactor;
|
|
24356
24356
|
this._hOffset = u, this._currentContext.charTrackingFactor = { value: 1, isRelative: !1 };
|
|
24357
24357
|
let x = 0;
|
|
24358
24358
|
for (let w = 0; w < s.length; w++) {
|
|
@@ -24371,7 +24371,7 @@ class nf {
|
|
|
24371
24371
|
const w = [], k = [], C = [], U = [];
|
|
24372
24372
|
this._hOffset = u, this._vOffset = this.convertTopAlignedVOffset(
|
|
24373
24373
|
h + l * 0.1,
|
|
24374
|
-
this.
|
|
24374
|
+
this.currentFontSize
|
|
24375
24375
|
);
|
|
24376
24376
|
for (let B = 0; B < s.length; B++)
|
|
24377
24377
|
this.processChar(
|
|
@@ -24386,7 +24386,7 @@ class nf {
|
|
|
24386
24386
|
const w = [], k = [], C = [], U = [];
|
|
24387
24387
|
this._hOffset = u, this._vOffset = this.convertTopAlignedVOffset(
|
|
24388
24388
|
h - l * 0.6,
|
|
24389
|
-
this.
|
|
24389
|
+
this.currentFontSize
|
|
24390
24390
|
);
|
|
24391
24391
|
for (let B = 0; B < o.length; B++)
|
|
24392
24392
|
this.processChar(
|
|
@@ -24402,8 +24402,8 @@ class nf {
|
|
|
24402
24402
|
} else {
|
|
24403
24403
|
const w = [], k = [], C = [], U = [];
|
|
24404
24404
|
this._hOffset = u + m, this._vOffset = this.convertTopAlignedVOffset(
|
|
24405
|
-
h + this.
|
|
24406
|
-
this.
|
|
24405
|
+
h + this.currentFontSize * 0.3,
|
|
24406
|
+
this.currentFontSize
|
|
24407
24407
|
);
|
|
24408
24408
|
for (let z = 0; z < s.length; z++)
|
|
24409
24409
|
this.processChar(
|
|
@@ -24422,8 +24422,8 @@ class nf {
|
|
|
24422
24422
|
);
|
|
24423
24423
|
const B = [], O = [], H = [], W = [];
|
|
24424
24424
|
this._hOffset = u + F, this._vOffset = this.convertTopAlignedVOffset(
|
|
24425
|
-
h - this.
|
|
24426
|
-
this.
|
|
24425
|
+
h - this.currentFontSize * 0.6,
|
|
24426
|
+
this.currentFontSize
|
|
24427
24427
|
);
|
|
24428
24428
|
for (let z = 0; z < o.length; z++)
|
|
24429
24429
|
this.processChar(
|
|
@@ -24436,10 +24436,10 @@ class nf {
|
|
|
24436
24436
|
if (r.push(...B), n.push(...O), a.push(...H), i.push(...W), c === "/" || c === "#") {
|
|
24437
24437
|
const z = new M.BufferGeometry(), le = new Float32Array([
|
|
24438
24438
|
u,
|
|
24439
|
-
h - this.
|
|
24439
|
+
h - this.currentFontSize * 0.8 + this.defaultFontSize * Zt,
|
|
24440
24440
|
0,
|
|
24441
24441
|
u + b,
|
|
24442
|
-
h - this.
|
|
24442
|
+
h - this.currentFontSize * 0.8 + this.defaultFontSize * Zt,
|
|
24443
24443
|
0
|
|
24444
24444
|
]);
|
|
24445
24445
|
z.setAttribute(
|
|
@@ -24456,7 +24456,7 @@ class nf {
|
|
|
24456
24456
|
}
|
|
24457
24457
|
recordStackDivider(e, r, n, a, i) {
|
|
24458
24458
|
if (this._options.collectCharBoxes === !1) return;
|
|
24459
|
-
const s = r - this.
|
|
24459
|
+
const s = r - this.currentFontSize * 0.8 + this.defaultFontSize * Zt, o = new M.Box3(
|
|
24460
24460
|
new M.Vector3(e, s, 0),
|
|
24461
24461
|
new M.Vector3(e + n, s, 0)
|
|
24462
24462
|
);
|
|
@@ -25752,6 +25752,7 @@ export {
|
|
|
25752
25752
|
Nr as MTextToken,
|
|
25753
25753
|
sf as MainThreadRenderer,
|
|
25754
25754
|
tr as STACK_DIVIDER_CHAR,
|
|
25755
|
+
il as ShxParserFont,
|
|
25755
25756
|
Pr as TextScanner,
|
|
25756
25757
|
Z as TokenType,
|
|
25757
25758
|
lf as UnifiedRenderer,
|