@mlightcad/mtext-renderer 0.12.8 → 0.12.10
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 +217 -144
- package/dist/index.umd.cjs +9 -9
- package/dist/mtext-renderer-worker.js +289 -216
- package/lib/font/defaultFontsPresets.d.ts +11 -2
- package/lib/font/fontManager.d.ts +22 -0
- package/package.json +1 -1
|
@@ -13,8 +13,17 @@ export type DefaultFontsPreset =
|
|
|
13
13
|
| 'modern'
|
|
14
14
|
/** Western SHX fonts plus simsun and AMGDT; no CJK-specific SHX big fonts. */
|
|
15
15
|
| 'international'
|
|
16
|
-
/**
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Broad CJK coverage: Chinese / Korean / Japanese mesh fonts plus matching
|
|
18
|
+
* SHX big fonts.
|
|
19
|
+
*/
|
|
20
|
+
| 'cjk'
|
|
21
|
+
/** Simplified Chinese: simsun (TTF) plus GB big-font SHX. */
|
|
22
|
+
| 'chinese'
|
|
23
|
+
/** Korean: malgun / Noto Sans KR (TTF) plus Korean big-font SHX. */
|
|
24
|
+
| 'korean'
|
|
25
|
+
/** Japanese: MS Gothic (TTF) plus extfont2 / extfont SHX. */
|
|
26
|
+
| 'japanese';
|
|
18
27
|
/**
|
|
19
28
|
* Predefined text-font fallback chains (primary / big-font substitutes and CJK
|
|
20
29
|
* mesh fallbacks). Symbol fonts such as `amgdt` are configured separately via
|
|
@@ -352,6 +352,28 @@ export declare class FontManager {
|
|
|
352
352
|
* @param scheduleLoad - When true (default), also {@link requestFont} on first miss if lazy loading is on
|
|
353
353
|
*/
|
|
354
354
|
private recordMissedFonts;
|
|
355
|
+
/**
|
|
356
|
+
* Adds catalog / `fonts.json` names onto a font instance.
|
|
357
|
+
*/
|
|
358
|
+
private applyCatalogNames;
|
|
359
|
+
/**
|
|
360
|
+
* Ensures an already-loaded primary face is also addressable under the
|
|
361
|
+
* current catalog names. Needed when IndexedDB still has an older alias
|
|
362
|
+
* list (e.g. `noto-sans-kr` cached before `malgun` was added) or when the
|
|
363
|
+
* binary was loaded under the file basename first.
|
|
364
|
+
*/
|
|
365
|
+
private ensureCatalogAliases;
|
|
366
|
+
/**
|
|
367
|
+
* Merges catalog / primary names into an existing IndexedDB alias list so
|
|
368
|
+
* cold starts after `getAllFontsFromCache` pick up newly added style names.
|
|
369
|
+
*/
|
|
370
|
+
private persistCatalogAliases;
|
|
371
|
+
/**
|
|
372
|
+
* Clears miss / failed-request bookkeeping for a primary name and aliases
|
|
373
|
+
* so a later alias request is not permanently blocked after the binary
|
|
374
|
+
* loaded under a different key.
|
|
375
|
+
*/
|
|
376
|
+
private clearRequestStateForNames;
|
|
355
377
|
/**
|
|
356
378
|
* Loads a single font
|
|
357
379
|
* @param fontInfo - The matadata of the font to be loaded
|