@mlightcad/mtext-renderer 0.10.16 → 0.11.0

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/README.md CHANGED
@@ -20,7 +20,7 @@ The central manager for font operations. It's a singleton class that handles fon
20
20
  - `missedFonts`: Record of fonts that were requested but not found
21
21
  - `enableFontCache`: Flag to enable/disable font caching. If it is true, parsed fonts
22
22
  will be stored in local IndexedDB to improve performance. Default value is true.
23
- - `defaultFont`: Default font to use when a requested font is not found
23
+ - `defaultFonts`: Set of default font names; used when a requested font is not found or lacks a glyph (earlier entries are tried first)
24
24
  - `events`: Event managers for font-related events
25
25
  - `fontNotFound`: Triggered when a font cannot be found
26
26
  - `fontLoaded`: Triggered when a font is successfully loaded
@@ -36,7 +36,7 @@ will be stored in local IndexedDB to improve performance. Default value is true.
36
36
 
37
37
  ### FontLoader & DefaultFontLoader
38
38
 
39
- Interface for font loading operations. The default implementation [DefaultFontLoader](./src/font/defaultFontLoader.ts) uses [this font repository](https://mlightcad.gitlab.io/cad-data/fonts/). It loads font metadata from a JSON file and provides access to available fonts.
39
+ Interface for font loading operations. The default implementation [DefaultFontLoader](./src/font/defaultFontLoader.ts) uses [this font repository](https://cdn.jsdelivr.net/gh/mlightcad/cad-data/fonts/). It loads font metadata from a JSON file and provides access to available fonts.
40
40
 
41
41
  You do NOT need to create `DefaultFontLoader` yourself anymore. `FontManager` manages a loader instance internally. If you want to customize font loading, implement `FontLoader` and set it via `FontManager.instance.setFontLoader(customLoader)`.
42
42
 
@@ -192,7 +192,7 @@ classDiagram
192
192
  +unsupportedChars: Record
193
193
  +missedFonts: Record
194
194
  +enableFontCache: boolean
195
- +defaultFont: string
195
+ +defaultFonts: Set~string~
196
196
  +events: EventManagers
197
197
  +loadFonts(urls)
198
198
  +getCharShape(char, fontName, size)