@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.
@@ -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
- /** Broad CJK coverage: simsun first, then GB big-font SHX files. */
17
- | 'cjk';
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mlightcad/mtext-renderer",
3
- "version": "0.12.8",
3
+ "version": "0.12.10",
4
4
  "description": "AutoCAD MText renderer based on Three.js",
5
5
  "license": "MIT",
6
6
  "author": "MLight Lee <mlight.lee@outlook.com>",