@mlightcad/mtext-renderer 0.3.3 → 0.3.5

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.
@@ -1,4 +1,4 @@
1
- import { FontInfo, FontLoader } from './fontLoader';
1
+ import { FontInfo, FontLoader, FontLoadStatus } from './fontLoader';
2
2
 
3
3
  /**
4
4
  * Default implementation of the FontLoader interface.
@@ -25,10 +25,11 @@ export declare class DefaultFontLoader implements FontLoader {
25
25
  */
26
26
  getAvaiableFonts(): Promise<FontInfo[]>;
27
27
  /**
28
- * Loads the specified fonts into the system.
29
- * If no font names are provided, loads all available fonts.
28
+ * Loads the specified fonts into the system. If one font is already loaded,
29
+ * the font will not be loaded again. If no font names are provided, just loads
30
+ * all available fonts information (not fonts).
30
31
  * @param fontNames - Array of font names to load
31
32
  * @returns Promise that resolves to an array of FontLoadStatus objects
32
33
  */
33
- load(fontNames: string[]): Promise<import('./fontLoader').FontLoadStatus[]>;
34
+ load(fontNames: string[]): Promise<FontLoadStatus[]>;
34
35
  }
@@ -102,6 +102,12 @@ export declare class FontManager {
102
102
  * @returns The shape for the not found indicator, or undefined if not available
103
103
  */
104
104
  getNotFoundTextShape(size: number): BaseTextShape | undefined;
105
+ /**
106
+ * Checks if a font is already loaded in the system
107
+ * @param fontName - The name of the font to check
108
+ * @returns True if the font is loaded, false otherwise
109
+ */
110
+ isFontLoaded(fontName: string): boolean;
105
111
  /**
106
112
  * Records a font that was requested but not found
107
113
  * @param fontName - The name of the font that was not found