@mlightcad/mtext-renderer 0.4.10 → 0.4.11

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.
@@ -77,6 +77,11 @@ export declare class FontManager {
77
77
  * @throws {Error} If font metadata cannot be loaded from the CDN
78
78
  */
79
79
  getAvaiableFonts(): Promise<import('./fontLoader').FontInfo[]>;
80
+ /**
81
+ * Return true if the default font was loaded.
82
+ * @returns True if the default font was loaded. False otherwise.
83
+ */
84
+ isDefaultFontLoaded(): boolean;
80
85
  /**
81
86
  * Loads the default font
82
87
  * @returns Promise that resolves to the font load statuses
@@ -7,6 +7,7 @@ import { MTextBaseRenderer, MTextObject } from './baseRenderer';
7
7
  export declare class MainThreadRenderer implements MTextBaseRenderer {
8
8
  private fontManager;
9
9
  private styleManager;
10
+ private isInitialized;
10
11
  constructor();
11
12
  /**
12
13
  * Render MText directly in the main thread
@@ -27,4 +28,5 @@ export declare class MainThreadRenderer implements MTextBaseRenderer {
27
28
  }>;
28
29
  }>;
29
30
  destroy(): void;
31
+ private ensureInitialized;
30
32
  }
@@ -108,12 +108,14 @@ export declare class WebWorkerRenderer implements MTextBaseRenderer {
108
108
  private poolSize;
109
109
  private isLoadFontsOnDemand;
110
110
  private readyPromise;
111
+ private isInitialized;
111
112
  constructor(config?: WebWorkerRendererConfig);
113
+ private ensureInitialized;
112
114
  private handleWorkerMessage;
113
115
  private attachWorkerHandlers;
114
116
  private pickLeastLoadedWorker;
115
117
  private sendMessage;
116
- private ensureInitialized;
118
+ private ensureTasksFinished;
117
119
  /**
118
120
  * Render MText in the worker and return serialized data
119
121
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mlightcad/mtext-renderer",
3
- "version": "0.4.10",
3
+ "version": "0.4.11",
4
4
  "description": "AutoCAD MText renderer based on Three.js",
5
5
  "license": "MIT",
6
6
  "author": "MLight Lee <mlight.lee@outlook.com>",