@mlightcad/mtext-renderer 0.2.5 → 0.3.1
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 +731 -690
- package/dist/index.umd.cjs +3 -3
- package/dist/renderer/mtextProcessor.d.ts +6 -19
- package/package.json +2 -2
|
@@ -55,22 +55,9 @@ export declare class MTextProcessor {
|
|
|
55
55
|
private _vOffset;
|
|
56
56
|
private _lineCount;
|
|
57
57
|
private _currentLineObjects;
|
|
58
|
-
private
|
|
59
|
-
private
|
|
60
|
-
private
|
|
61
|
-
private _currentBlankWidth;
|
|
62
|
-
private _currentFont;
|
|
63
|
-
private _currentFontScaleFactor;
|
|
64
|
-
private _currentFontSize;
|
|
65
|
-
private _currentFontSizeScaleFactor;
|
|
66
|
-
private _currentColor;
|
|
67
|
-
private _currentMaxFontSize;
|
|
68
|
-
private _currentUnderline;
|
|
69
|
-
private _currentOverline;
|
|
70
|
-
private _currentStrikeThrough;
|
|
71
|
-
private _currentObliqueAngle;
|
|
72
|
-
private _currentItalic;
|
|
73
|
-
private _currentBold;
|
|
58
|
+
private _contextStack;
|
|
59
|
+
private _currentContext;
|
|
60
|
+
private _maxFontSize;
|
|
74
61
|
/**
|
|
75
62
|
* Construct one instance of this class and initialize some properties with default values.
|
|
76
63
|
* @param style Input text style
|
|
@@ -189,9 +176,7 @@ export declare class MTextProcessor {
|
|
|
189
176
|
private processChar;
|
|
190
177
|
processLastLine(): void;
|
|
191
178
|
private initLineParams;
|
|
192
|
-
private changeFontHeight;
|
|
193
179
|
private changeFont;
|
|
194
|
-
private changeFontSizeScaleFactor;
|
|
195
180
|
/**
|
|
196
181
|
* Calcuate font size, line space, line height and other parameters.
|
|
197
182
|
*/
|
|
@@ -217,11 +202,13 @@ export declare class MTextProcessor {
|
|
|
217
202
|
* - For SHX fonts (AutoCAD's built-in vector fonts, such as txt.shx), the space width is often half the text height.
|
|
218
203
|
* So if the text height is 10, the space width is typically 5 units.
|
|
219
204
|
*/
|
|
220
|
-
private
|
|
205
|
+
private calculateBlankWidthForFont;
|
|
221
206
|
/**
|
|
222
207
|
* Convert the text shape geometries to three.js object
|
|
223
208
|
* @param geometries Input text shape geometries
|
|
224
209
|
* @returns Return three.js object created from the specified text shape geometries
|
|
225
210
|
*/
|
|
226
211
|
private toThreeObject;
|
|
212
|
+
private changeFontSizeScaleFactor;
|
|
213
|
+
private changeFontHeight;
|
|
227
214
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlightcad/mtext-renderer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "AutoCAD MText renderer based on Three.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"author": "",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@mlightcad/mtext-parser": "^1.1.
|
|
24
|
+
"@mlightcad/mtext-parser": "^1.1.2",
|
|
25
25
|
"@mlightcad/shx-parser": "^1.0.4",
|
|
26
26
|
"opentype.js": "^1.3.4",
|
|
27
27
|
"idb": "^8.0.3"
|