@mlightcad/mtext-renderer 0.12.10 → 0.12.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.
@@ -15,6 +15,12 @@ export declare class DefaultFontLoader implements FontLoader {
15
15
  * each hit `fonts.json` independently.
16
16
  */
17
17
  private _availableFontsPromise;
18
+ /**
19
+ * At most one forced `fonts.json` revalidation per baseUrl. Used when a
20
+ * requested face is missing from a possibly stale HTTP-cached catalog
21
+ * (e.g. jsDelivr `@main` with a long max-age).
22
+ */
23
+ private _catalogRefreshAttempted;
18
24
  /**
19
25
  * Creates a new instance of DefaultFontLoader
20
26
  */
@@ -51,6 +57,12 @@ export declare class DefaultFontLoader implements FontLoader {
51
57
  * @returns Promise that resolves to an array of FontLoadStatus objects
52
58
  */
53
59
  load(fontNames: readonly string[]): Promise<FontLoadStatus[]>;
60
+ private clearAvailableFontsCache;
61
+ /**
62
+ * Drops the in-memory catalog and refetches `fonts.json`, bypassing the HTTP
63
+ * cache so CDN updates are visible after a miss.
64
+ */
65
+ private refreshAvailableFontsFromNetwork;
54
66
  /**
55
67
  * Fetches and caches remote font metadata for the given base URL.
56
68
  */
@@ -19,6 +19,8 @@ export declare class UnifiedRenderer {
19
19
  private workerLazyFontLoading;
20
20
  /** Last awaitFontsBeforeDraw value pushed to the worker pool, if any. */
21
21
  private workerAwaitFontsBeforeDraw;
22
+ /** Last font base URL pushed to the worker pool, if any. */
23
+ private workerFontUrl;
22
24
  /**
23
25
  * Constructor
24
26
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mlightcad/mtext-renderer",
3
- "version": "0.12.10",
3
+ "version": "0.12.11",
4
4
  "description": "AutoCAD MText renderer based on Three.js",
5
5
  "license": "MIT",
6
6
  "author": "MLight Lee <mlight.lee@outlook.com>",