@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.
- package/dist/index.js +595 -541
- package/dist/index.umd.cjs +7 -7
- package/dist/mtext-renderer-worker.js +280 -235
- package/lib/font/defaultFontLoader.d.ts +12 -0
- package/lib/worker/unifiedRenderer.d.ts +2 -0
- package/package.json +1 -1
|
@@ -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
|
*
|