@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
|
@@ -29537,7 +29537,7 @@ var P1 = Fc((L) => {
|
|
|
29537
29537
|
);
|
|
29538
29538
|
}
|
|
29539
29539
|
processStack(e, t, r, i, s) {
|
|
29540
|
-
const [a, o, h] = e, c = this._hOffset, u = this._vOffset, f = this._currentContext.charTrackingFactor.value, l = this.
|
|
29540
|
+
const [a, o, h] = e, c = this._hOffset, u = this._vOffset, f = this._currentContext.charTrackingFactor.value, l = this.currentFontSize, p = this._currentContext.fontSizeScaleFactor;
|
|
29541
29541
|
this._hOffset = c, this._currentContext.charTrackingFactor = { value: 1, isRelative: !1 };
|
|
29542
29542
|
let g = 0;
|
|
29543
29543
|
for (let b = 0; b < a.length; b++) {
|
|
@@ -29556,7 +29556,7 @@ var P1 = Fc((L) => {
|
|
|
29556
29556
|
const b = [], S = [], T = [], B = [];
|
|
29557
29557
|
this._hOffset = c, this._vOffset = this.convertTopAlignedVOffset(
|
|
29558
29558
|
u + l * 0.1,
|
|
29559
|
-
this.
|
|
29559
|
+
this.currentFontSize
|
|
29560
29560
|
);
|
|
29561
29561
|
for (let M = 0; M < a.length; M++)
|
|
29562
29562
|
this.processChar(
|
|
@@ -29571,7 +29571,7 @@ var P1 = Fc((L) => {
|
|
|
29571
29571
|
const b = [], S = [], T = [], B = [];
|
|
29572
29572
|
this._hOffset = c, this._vOffset = this.convertTopAlignedVOffset(
|
|
29573
29573
|
u - l * 0.6,
|
|
29574
|
-
this.
|
|
29574
|
+
this.currentFontSize
|
|
29575
29575
|
);
|
|
29576
29576
|
for (let M = 0; M < o.length; M++)
|
|
29577
29577
|
this.processChar(
|
|
@@ -29587,8 +29587,8 @@ var P1 = Fc((L) => {
|
|
|
29587
29587
|
} else {
|
|
29588
29588
|
const b = [], S = [], T = [], B = [];
|
|
29589
29589
|
this._hOffset = c + v, this._vOffset = this.convertTopAlignedVOffset(
|
|
29590
|
-
u + this.
|
|
29591
|
-
this.
|
|
29590
|
+
u + this.currentFontSize * 0.3,
|
|
29591
|
+
this.currentFontSize
|
|
29592
29592
|
);
|
|
29593
29593
|
for (let G = 0; G < a.length; G++)
|
|
29594
29594
|
this.processChar(
|
|
@@ -29607,8 +29607,8 @@ var P1 = Fc((L) => {
|
|
|
29607
29607
|
);
|
|
29608
29608
|
const M = [], _ = [], D = [], N = [];
|
|
29609
29609
|
this._hOffset = c + w, this._vOffset = this.convertTopAlignedVOffset(
|
|
29610
|
-
u - this.
|
|
29611
|
-
this.
|
|
29610
|
+
u - this.currentFontSize * 0.6,
|
|
29611
|
+
this.currentFontSize
|
|
29612
29612
|
);
|
|
29613
29613
|
for (let G = 0; G < o.length; G++)
|
|
29614
29614
|
this.processChar(
|
|
@@ -29621,10 +29621,10 @@ var P1 = Fc((L) => {
|
|
|
29621
29621
|
if (t.push(...M), r.push(..._), i.push(...D), s.push(...N), h === "/" || h === "#") {
|
|
29622
29622
|
const G = new ze(), ee = new Float32Array([
|
|
29623
29623
|
c,
|
|
29624
|
-
u - this.
|
|
29624
|
+
u - this.currentFontSize * 0.8 + this.defaultFontSize * Wn,
|
|
29625
29625
|
0,
|
|
29626
29626
|
c + x,
|
|
29627
|
-
u - this.
|
|
29627
|
+
u - this.currentFontSize * 0.8 + this.defaultFontSize * Wn,
|
|
29628
29628
|
0
|
|
29629
29629
|
]);
|
|
29630
29630
|
G.setAttribute(
|
|
@@ -29641,7 +29641,7 @@ var P1 = Fc((L) => {
|
|
|
29641
29641
|
}
|
|
29642
29642
|
recordStackDivider(e, t, r, i, s) {
|
|
29643
29643
|
if (this._options.collectCharBoxes === !1) return;
|
|
29644
|
-
const a = t - this.
|
|
29644
|
+
const a = t - this.currentFontSize * 0.8 + this.defaultFontSize * Wn, o = new Ee(
|
|
29645
29645
|
new E(e, a, 0),
|
|
29646
29646
|
new E(e + r, a, 0)
|
|
29647
29647
|
);
|
package/lib/index.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports from @mlightcad/shx-parser so consumers can use SHX parsing utilities
|
|
3
|
+
* (e.g. character-map SVG preview) without a direct shx-parser dependency.
|
|
4
|
+
*
|
|
5
|
+
* `ShxParserFont` is the parser library font class; this package also exports a
|
|
6
|
+
* renderer-facing `ShxFont` wrapper under `./font/shxFont`.
|
|
7
|
+
*/
|
|
8
|
+
export { ShxFont as ShxParserFont } from '@mlightcad/shx-parser';
|
|
9
|
+
export type { ShxFontData } from '@mlightcad/shx-parser';
|