@mlightcad/mtext-renderer 0.11.4 → 0.11.6
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 +1344 -1312
- package/dist/index.umd.cjs +8 -8
- package/dist/mtext-renderer-worker.js +374 -341
- package/lib/font/fontManager.d.ts +7 -0
- package/lib/font/meshFont.d.ts +5 -0
- package/lib/renderer/mtext.d.ts +4 -0
- package/package.json +2 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ShxFontType } from '@mlightcad/shx-parser';
|
|
1
2
|
import { EventManager } from '../common';
|
|
2
3
|
import { BaseFont } from './baseFont';
|
|
3
4
|
import { BaseTextShape } from './baseTextShape';
|
|
@@ -240,6 +241,12 @@ export declare class FontManager {
|
|
|
240
241
|
* @returns The type of the font. If the specified font can't be found, `undefined` is returned
|
|
241
242
|
*/
|
|
242
243
|
getFontType(fontName: string): FontType | undefined;
|
|
244
|
+
/**
|
|
245
|
+
* Gets the type of the SHX font. Such as BIGFONT, SHAPES, UNIFONT.
|
|
246
|
+
* @param fontName - The name of the font
|
|
247
|
+
* @returns The type of the SHX font, or undefined if the specified font is not a SHX font
|
|
248
|
+
*/
|
|
249
|
+
getShxFontType(fontName: string): ShxFontType | undefined;
|
|
243
250
|
/**
|
|
244
251
|
* Gets the shape to display when a character is not found
|
|
245
252
|
* @param size - The size of the shape
|
package/lib/font/meshFont.d.ts
CHANGED
|
@@ -82,6 +82,11 @@ export declare class MeshFont extends BaseFont {
|
|
|
82
82
|
* @returns An object containing the opentype font and parsed metadata
|
|
83
83
|
*/
|
|
84
84
|
private parseMeshFont;
|
|
85
|
+
/**
|
|
86
|
+
* Resolves the opentype lookup character for a drawing character.
|
|
87
|
+
* Tries Unicode first, then Symbol encoding (0xF000 + ASCII) for GDT fonts.
|
|
88
|
+
*/
|
|
89
|
+
private opentypeLookupChar;
|
|
85
90
|
/**
|
|
86
91
|
* Whether opentype maps the character to a real glyph (not .notdef at index 0).
|
|
87
92
|
*
|
package/lib/renderer/mtext.d.ts
CHANGED
|
@@ -105,6 +105,10 @@ export declare class MText extends THREE.Object3D {
|
|
|
105
105
|
* Builds and places one SHX shape glyph.
|
|
106
106
|
*/
|
|
107
107
|
loadShape(shapeData: ShapeData, style: TextStyle): THREE.Object3D<THREE.Object3DEventMap> | undefined;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @param options.shxFontType The type of SHX font.
|
|
111
|
+
*/
|
|
108
112
|
private finalizePlacement;
|
|
109
113
|
private createShapeGroup;
|
|
110
114
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlightcad/mtext-renderer",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.6",
|
|
4
4
|
"description": "AutoCAD MText renderer based on Three.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "MLight Lee <mlight.lee@outlook.com>",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@mlightcad/mtext-parser": "^1.5.0",
|
|
47
|
-
"@mlightcad/shx-parser": "^1.3.
|
|
47
|
+
"@mlightcad/shx-parser": "^1.3.5",
|
|
48
48
|
"iconv-lite": "^0.7.0",
|
|
49
49
|
"idb": "^8.0.3",
|
|
50
50
|
"opentype.js": "^2.0.0"
|