@arcblock/did-connect-service 4.1.58 → 4.1.60
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/assets/fonts/subset-v1/noto-sans-sc-regular.otf +0 -0
- package/dist/og/font-fallback.d.ts +105 -0
- package/dist/og/font-fallback.d.ts.map +1 -0
- package/dist/og/font-fallback.js +170 -0
- package/dist/og/font-fallback.js.map +1 -0
- package/dist/og/font-subset.d.ts +60 -0
- package/dist/og/font-subset.d.ts.map +1 -0
- package/dist/og/font-subset.js +271 -0
- package/dist/og/font-subset.js.map +1 -0
- package/dist/og/generator.d.ts +4 -2
- package/dist/og/generator.d.ts.map +1 -1
- package/dist/og/generator.js +66 -11
- package/dist/og/generator.js.map +1 -1
- package/dist/og/node-font-files.d.ts +86 -0
- package/dist/og/node-font-files.d.ts.map +1 -0
- package/dist/og/node-font-files.js +280 -0
- package/dist/og/node-font-files.js.map +1 -0
- package/dist/og/subset-fonts.generated.d.ts +104 -0
- package/dist/og/subset-fonts.generated.d.ts.map +1 -0
- package/dist/og/subset-fonts.generated.js +46 -0
- package/dist/og/subset-fonts.generated.js.map +1 -0
- package/dist/og/tree-node.d.ts +22 -3
- package/dist/og/tree-node.d.ts.map +1 -1
- package/dist/og/tree-node.js +87 -22
- package/dist/og/tree-node.js.map +1 -1
- package/dist/og/worker.d.ts +63 -4
- package/dist/og/worker.d.ts.map +1 -1
- package/dist/og/worker.js +339 -67
- package/dist/og/worker.js.map +1 -1
- package/package.json +3 -3
package/dist/og/tree-node.js
CHANGED
|
@@ -19,6 +19,18 @@
|
|
|
19
19
|
* - Missing Bold renders 700 with Regular (`boldFallback: true` on the event).
|
|
20
20
|
* Only a success, "not configured", or a missing DERIVED file is cached; a
|
|
21
21
|
* failure of an explicitly configured URL is retried on the next render.
|
|
22
|
+
* - Subsets (ArcBlock/arc#8800): next to each font, `subset-v1/<same name>`
|
|
23
|
+
* (the bundled face ships `assets/fonts/subset-v1/noto-sans-sc-regular.otf`;
|
|
24
|
+
* for a URL, the sibling `…/subset-v1/NotoSansSC-Regular.otf`). When every
|
|
25
|
+
* character of the tree is covered and the subset file exists with the
|
|
26
|
+
* build's sha256, it is used instead of the full face (same pixels, a
|
|
27
|
+
* fraction of the parse). A Bold subset is needed only when a full Bold
|
|
28
|
+
* exists. Otherwise — unknown font, missing file, uncovered text — the full
|
|
29
|
+
* fonts, as before (`fontSubset` on the event says which).
|
|
30
|
+
* - Fallbacks (ArcBlock/arc#8832): characters the Regular font lacks are drawn
|
|
31
|
+
* by other CJK families found NEXT TO it under the font-bucket file names
|
|
32
|
+
* (`node-font-files.ts`), chosen like the Worker (`font-fallback.ts`). The
|
|
33
|
+
* bundled face has none next to it, so the default renders as before.
|
|
22
34
|
*
|
|
23
35
|
* No wall-clock guard around satori/resvg here (`Resvg.render()` is one
|
|
24
36
|
* synchronous wasm call; a timer cannot interrupt it). Render cost is bounded
|
|
@@ -28,20 +40,22 @@
|
|
|
28
40
|
* Moving renders into `worker_threads` with a timeout is left to the host
|
|
29
41
|
* (ArcBlock/arc#8746) if still wanted.
|
|
30
42
|
*/
|
|
31
|
-
import { createHash } from "node:crypto";
|
|
32
43
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
33
44
|
import { readFile } from "node:fs/promises";
|
|
34
45
|
import { createRequire } from "node:module";
|
|
35
46
|
import { tmpdir } from "node:os";
|
|
36
47
|
import { dirname, join } from "node:path";
|
|
37
|
-
import { fileURLToPath } from "node:url";
|
|
48
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
38
49
|
import { consoleLogger } from "../logger.js";
|
|
39
|
-
import {
|
|
50
|
+
import { collectOgTreeCodepoints, ogSubsetCovers } from "./font-subset.js";
|
|
51
|
+
import { FONT_FETCH_TIMEOUT_MS, FONT_PATH, loadFont } from "./generator.js";
|
|
40
52
|
import { resolveNodeOgConfig } from "./node-config.js";
|
|
53
|
+
import { deriveBoldFontUrl, deriveSubsetFontUrl, loadNodeFallbackFonts, loadSubsetFile, md5, nodeFallbackFamiliesWanted, nodeFontSetFor, resetOgNodeFontFilesForTesting, } from "./node-font-files.js";
|
|
41
54
|
import { rasterizeSvgToPngWithWasm } from "./node-wasm-fallback.js";
|
|
42
55
|
import { createSerialQueue, OG_RENDER_UNAVAILABLE_CODES, OG_TREE_ERROR_CODES, OgRenderUnavailableError, OgTreeRenderError, prepareOgTree, wantsBold, withTimeout, } from "./tree.js";
|
|
43
56
|
/** Default deadline for waiting in the process render queue. */
|
|
44
57
|
export const OG_NODE_QUEUE_MAX_WAIT_MS = 20_000;
|
|
58
|
+
export { deriveBoldFontUrl, deriveSubsetFontUrl } from "./node-font-files.js";
|
|
45
59
|
const serialRender = createSerialQueue();
|
|
46
60
|
let satoriReady;
|
|
47
61
|
/** One cached Bold result (keyed by its URL); a different URL replaces it. `null` = no Bold. */
|
|
@@ -66,19 +80,6 @@ function loadSatori() {
|
|
|
66
80
|
}
|
|
67
81
|
return satoriReady;
|
|
68
82
|
}
|
|
69
|
-
function md5(s) {
|
|
70
|
-
return createHash("md5").update(s).digest("hex");
|
|
71
|
-
}
|
|
72
|
-
/** `…Regular…` → `…Bold…` in the last path segment; undefined when the name has no Regular marker. */
|
|
73
|
-
export function deriveBoldFontUrl(regularUrl) {
|
|
74
|
-
if (!regularUrl)
|
|
75
|
-
return undefined;
|
|
76
|
-
const slash = regularUrl.lastIndexOf("/");
|
|
77
|
-
const head = regularUrl.slice(0, slash + 1);
|
|
78
|
-
const name = regularUrl.slice(slash + 1);
|
|
79
|
-
const bold = name.replace(/Regular/, "Bold").replace(/regular/, "bold");
|
|
80
|
-
return bold === name ? undefined : head + bold;
|
|
81
|
-
}
|
|
82
83
|
async function fetchFontBytes(url, fontCacheDir, fetchImpl) {
|
|
83
84
|
if (url.startsWith("file:"))
|
|
84
85
|
return readFile(fileURLToPath(url));
|
|
@@ -118,10 +119,16 @@ async function loadBold(explicitUrl, regularUrl, fontCacheDir, fetchImpl, logger
|
|
|
118
119
|
return null;
|
|
119
120
|
}
|
|
120
121
|
}
|
|
121
|
-
/**
|
|
122
|
+
/** The subset set built from the Regular font at `regularUrl` (the bundled face when unset). */
|
|
123
|
+
function subsetPlanFor(regularUrl) {
|
|
124
|
+
const found = nodeFontSetFor(regularUrl);
|
|
125
|
+
return found ? { set: found.set, url: found.subsetUrl } : undefined;
|
|
126
|
+
}
|
|
127
|
+
/** Test isolation: forget cached Bold / subset bytes and re-arm the warnings. */
|
|
122
128
|
export function resetOgNodeTreeFontsForTesting() {
|
|
123
129
|
boldSlot = undefined;
|
|
124
130
|
boldMissingWarned = false;
|
|
131
|
+
resetOgNodeFontFilesForTesting();
|
|
125
132
|
}
|
|
126
133
|
/**
|
|
127
134
|
* Renders a caller-built satori tree to PNG bytes. Rejects with an
|
|
@@ -138,20 +145,68 @@ export async function renderOgTree(options) {
|
|
|
138
145
|
const fontCacheDir = options.fontCacheDir ?? join(tmpdir(), "og-fonts");
|
|
139
146
|
const fontTimeout = options.fontReadTimeoutMs ?? FONT_FETCH_TIMEOUT_MS;
|
|
140
147
|
const regularUrl = options.fontUrl ?? config.fontUrl;
|
|
148
|
+
const explicitBoldUrl = options.boldFontUrl ?? config.boldFontUrl;
|
|
141
149
|
const timeoutError = () => new OgRenderUnavailableError(OG_RENDER_UNAVAILABLE_CODES.fontTimeout, `font load exceeded ${fontTimeout}ms`);
|
|
142
|
-
const
|
|
150
|
+
const boldWanted = wantsBold(options.weights);
|
|
151
|
+
const resolvedRegularUrl = regularUrl ?? pathToFileURL(FONT_PATH).href;
|
|
152
|
+
const plan = subsetPlanFor(resolvedRegularUrl);
|
|
153
|
+
const codepoints = collectOgTreeCodepoints(tree);
|
|
154
|
+
const covered = plan ? ogSubsetCovers(plan.set, codepoints) : false;
|
|
155
|
+
/** Full Bold (cached), bounded by the font deadline. */
|
|
156
|
+
const fullBold = () => withTimeout(loadBold(explicitBoldUrl, regularUrl, fontCacheDir, fetchImpl, logger), fontTimeout, timeoutError);
|
|
157
|
+
/** Subset Regular (+ Bold), or null when the full fonts must be used. Errors ⇒ null for this render. */
|
|
158
|
+
async function subsetFonts() {
|
|
159
|
+
if (!plan || !covered)
|
|
160
|
+
return null;
|
|
161
|
+
try {
|
|
162
|
+
const load = (url, sha256) => withTimeout(loadSubsetFile(url, sha256, fontCacheDir, fetchImpl, logger), fontTimeout, timeoutError);
|
|
163
|
+
const regular = await load(plan.url, plan.set.regular.sha256);
|
|
164
|
+
if (!regular)
|
|
165
|
+
return null;
|
|
166
|
+
if (!boldWanted)
|
|
167
|
+
return { regular, bold: null };
|
|
168
|
+
const boldSubset = deriveSubsetFontUrl(explicitBoldUrl ?? deriveBoldFontUrl(resolvedRegularUrl));
|
|
169
|
+
if (plan.set.bold && boldSubset?.file === plan.set.bold.file) {
|
|
170
|
+
const bold = await load(boldSubset.url, plan.set.bold.sha256);
|
|
171
|
+
if (bold)
|
|
172
|
+
return { regular, bold };
|
|
173
|
+
}
|
|
174
|
+
// No Bold subset: still a hit when there is no full Bold either (700 is
|
|
175
|
+
// drawn with Regular both ways); otherwise the full fonts.
|
|
176
|
+
return (await fullBold()) ? null : { regular, bold: null };
|
|
177
|
+
}
|
|
178
|
+
catch (err) {
|
|
179
|
+
logger.warn({ message: "[og] subset font load failed; rendering with the full font", mod: "og", err });
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/** Cross-script fallbacks (arc#8832); a failure renders without them for this render. */
|
|
184
|
+
async function fallbackFonts(primaryBytes, primaryFull) {
|
|
185
|
+
try {
|
|
186
|
+
return await withTimeout(loadNodeFallbackFonts({ regularUrl: resolvedRegularUrl, primaryBytes, primaryFull, codepoints, bold: boldWanted, fontCacheDir, fetchImpl, logger }), fontTimeout, timeoutError);
|
|
187
|
+
}
|
|
188
|
+
catch (err) {
|
|
189
|
+
logger.warn({ message: "[og] fallback font load failed; rendering without fallbacks", mod: "og", err });
|
|
190
|
+
const wanted = { regularUrl: resolvedRegularUrl, primaryBytes, primaryFull, codepoints, bold: boldWanted };
|
|
191
|
+
return { fallbacks: [], skipped: nodeFallbackFamiliesWanted(wanted), degraded: true };
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
const { png, queueMs, fontReadMs, boldFallback, fontSubset, fallbacks } = await serialRender(async ({ queueMs }) => {
|
|
143
195
|
const satori = await loadSatori();
|
|
144
196
|
const fontStart = performance.now();
|
|
145
|
-
const
|
|
197
|
+
const subset = await subsetFonts();
|
|
198
|
+
const fontSubset = subset ? "hit" : plan && !covered ? "miss" : "absent";
|
|
199
|
+
const regular = subset?.regular ??
|
|
200
|
+
(await withTimeout(loadFont({ fontUrl: regularUrl, fontCacheDir, fetchImpl, logger, timeoutMs: fontTimeout }), fontTimeout, timeoutError));
|
|
146
201
|
let bold = null;
|
|
147
|
-
const boldWanted = wantsBold(options.weights);
|
|
148
202
|
if (boldWanted) {
|
|
149
|
-
bold =
|
|
203
|
+
bold = subset ? subset.bold : await fullBold();
|
|
150
204
|
if (!bold && !boldMissingWarned) {
|
|
151
205
|
boldMissingWarned = true;
|
|
152
206
|
logger.warn({ message: "[og] bold font missing; rendering weight 700 with the regular face", mod: "og" });
|
|
153
207
|
}
|
|
154
208
|
}
|
|
209
|
+
const fallbacks = await fallbackFonts(regular.byteLength + (bold?.byteLength ?? 0), !subset);
|
|
155
210
|
const fontReadMs = performance.now() - fontStart;
|
|
156
211
|
// Fresh ArrayBuffer copies per render: satori's parsed font objects are
|
|
157
212
|
// released with them instead of staying resident (same as the Worker).
|
|
@@ -161,6 +216,13 @@ export async function renderOgTree(options) {
|
|
|
161
216
|
];
|
|
162
217
|
if (bold)
|
|
163
218
|
fonts.push({ name: "Noto", data: copy(bold), weight: 700, style: "normal" });
|
|
219
|
+
// Fallback families after the primary, each under its own name (same as the Worker).
|
|
220
|
+
for (const fallback of fallbacks.fallbacks) {
|
|
221
|
+
const name = `Noto ${fallback.family}`;
|
|
222
|
+
fonts.push({ name, data: copy(fallback.regular), weight: 400, style: "normal" });
|
|
223
|
+
if (fallback.bold)
|
|
224
|
+
fonts.push({ name, data: copy(fallback.bold), weight: 700, style: "normal" });
|
|
225
|
+
}
|
|
164
226
|
let png;
|
|
165
227
|
try {
|
|
166
228
|
// No `loadAdditionalAsset`: og.png's emoji loader downloads glyphs, and a
|
|
@@ -176,7 +238,7 @@ export async function renderOgTree(options) {
|
|
|
176
238
|
// satori/resvg messages can quote the input; report a generic 400.
|
|
177
239
|
throw new OgTreeRenderError(OG_TREE_ERROR_CODES.renderFailed, "the tree could not be rendered");
|
|
178
240
|
}
|
|
179
|
-
return { png, queueMs, fontReadMs, boldFallback: boldWanted && !bold };
|
|
241
|
+
return { png, queueMs, fontReadMs, boldFallback: boldWanted && !bold, fontSubset, fallbacks };
|
|
180
242
|
}, { maxWaitMs: options.queueMaxWaitMs ?? OG_NODE_QUEUE_MAX_WAIT_MS });
|
|
181
243
|
options.observer?.({
|
|
182
244
|
locale: options.locale,
|
|
@@ -184,6 +246,9 @@ export async function renderOgTree(options) {
|
|
|
184
246
|
durationMs: performance.now() - startedAt,
|
|
185
247
|
queueMs,
|
|
186
248
|
fontReadMs,
|
|
249
|
+
fontSubset,
|
|
250
|
+
...(fallbacks.fallbacks.length ? { fontFallbacks: fallbacks.fallbacks.map((f) => f.url) } : {}),
|
|
251
|
+
...(fallbacks.skipped.length ? { fontFallbacksSkipped: fallbacks.skipped } : {}),
|
|
187
252
|
template: "tree",
|
|
188
253
|
...(boldFallback ? { boldFallback: true } : {}),
|
|
189
254
|
});
|
package/dist/og/tree-node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-node.js","sourceRoot":"","sources":["../../src/og/tree-node.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tree-node.js","sourceRoot":"","sources":["../../src/og/tree-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,EAAE,UA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,CAAC;IACH,OAAO,IAAI,UAAU,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;AACpE,CAAC"}
|
package/dist/og/worker.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { type Logger } from "../logger.js";
|
|
2
|
+
import { type OgCjkFamily } from "./font-fallback.js";
|
|
3
|
+
import { type OgFontSubsetStatus } from "./font-subset.js";
|
|
2
4
|
import { type OgTreeRenderOptions } from "./tree.js";
|
|
3
5
|
import type { OgGenerateOptions } from "./types.js";
|
|
6
|
+
export type { OgCjkFamily } from "./font-fallback.js";
|
|
7
|
+
export { OG_CJK_FALLBACK_PREFERENCE, OG_FONT_RENDER_BUDGET_BYTES } from "./font-fallback.js";
|
|
8
|
+
export type { OgFontSubsetStatus } from "./font-subset.js";
|
|
9
|
+
export { OG_SUBSET_FONTS, OG_SUBSET_PREFIX } from "./font-subset.js";
|
|
4
10
|
export type { OgImageInspection, OgImageKind, OgRenderUnavailableCode, OgTreeErrorCode, OgTreeImageStats, OgTreeNode, OgTreeRenderOptions, OgTreeWeight, } from "./tree.js";
|
|
5
11
|
export { inspectOgImage, OG_RENDER_UNAVAILABLE_CODES, OG_TREE_ERROR_CODES, OG_TREE_FONT_FAMILY, OG_TREE_LIMITS, OgRenderUnavailableError, OgTreeRenderError, sniffOgImageKind, validateOgTree, } from "./tree.js";
|
|
6
12
|
/** Default deadline for one font object read from the bucket. */
|
|
@@ -48,12 +54,34 @@ export interface OgWorkerLogoAsset {
|
|
|
48
54
|
export interface OgWorkerRenderEvent {
|
|
49
55
|
locale: OgWorkerLocale;
|
|
50
56
|
cacheStatus: OgWorkerCacheStatus;
|
|
51
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* `performance.now()` delta over the whole call, INCLUDING `queueMs` and
|
|
59
|
+
* `fontReadMs`. On Cloudflare Workers that clock only advances across I/O —
|
|
60
|
+
* it stands still during CPU work (satori, resvg, PNG encoding) — so there
|
|
61
|
+
* this is ≈ queue + font I/O, NOT the render's wall or CPU time. Use the
|
|
62
|
+
* platform's per-invocation `wallTimeMs` / `cpuTimeMs` for those. On Node it
|
|
63
|
+
* is the real wall time.
|
|
64
|
+
*/
|
|
52
65
|
durationMs: number;
|
|
53
66
|
/** Time spent waiting in the isolate render queue (renders only, not cache HITs). */
|
|
54
67
|
queueMs?: number;
|
|
55
|
-
/** Time spent loading fonts (≈0 when the raw-font slot already held them; includes first wasm init on a cold isolate). */
|
|
68
|
+
/** Time spent loading fonts — I/O (≈0 when the raw-font slot already held them; includes first wasm init on a cold isolate). */
|
|
56
69
|
fontReadMs?: number;
|
|
70
|
+
/**
|
|
71
|
+
* The PRIMARY (locale) font only: its subset used (`"hit"`), not covering the
|
|
72
|
+
* characters it draws (`"miss"`), or unavailable (`"absent"`) — renders only.
|
|
73
|
+
* See {@link OgFontSubsetStatus}. Characters the primary's full font does not
|
|
74
|
+
* have at all are drawn by fallbacks and do not make it a miss.
|
|
75
|
+
*/
|
|
76
|
+
fontSubset?: OgFontSubsetStatus;
|
|
77
|
+
/**
|
|
78
|
+
* Cross-script fallback fonts added after the primary (ArcBlock/arc#8832), in
|
|
79
|
+
* satori order, as the bucket key of each family's Regular object
|
|
80
|
+
* (`fonts/subset-v1/…` = its subset). Absent when the primary draws everything.
|
|
81
|
+
*/
|
|
82
|
+
fontFallbacks?: string[];
|
|
83
|
+
/** Fallback families the text needed but the render did not load (over the byte budget, or object missing). */
|
|
84
|
+
fontFallbacksSkipped?: OgCjkFamily[];
|
|
57
85
|
/** Weight 700 was requested but the Bold object is missing — drawn with Regular. */
|
|
58
86
|
boldFallback?: boolean;
|
|
59
87
|
/** `"tree"` for {@link OgWorkerRenderer.renderTree}; the template name for og.png renders. */
|
|
@@ -109,16 +137,39 @@ export interface OgWorkerTreeRenderOptions extends OgTreeRenderOptions, OgWorker
|
|
|
109
137
|
/** Defaults to the console logger. */
|
|
110
138
|
logger?: OgWorkerLogger;
|
|
111
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Raw font bytes kept between renders (ArcBlock/did#300, arc#8832): an LRU of
|
|
142
|
+
* font objects by bucket key, bounded by {@link OG_WORKER_FONT_CACHE_BYTES}.
|
|
143
|
+
* A render may need more than one family (its locale's primary plus
|
|
144
|
+
* cross-script fallbacks, `font-fallback.ts`), so the cache is keyed by object,
|
|
145
|
+
* not by locale. The least recently used objects are dropped once the resident
|
|
146
|
+
* total exceeds the budget; a different bucket clears it. Objects that are
|
|
147
|
+
* missing (or fail their sha256 check) are remembered as `null` for
|
|
148
|
+
* {@link MISSING_RECHECK_MS}, then probed again.
|
|
149
|
+
*
|
|
150
|
+
* Parsed fonts are never kept: each render hands satori fresh copies (see
|
|
151
|
+
* `font-subset.ts` for why a resident parse would grow without bound).
|
|
152
|
+
*/
|
|
153
|
+
export declare const OG_WORKER_FONT_CACHE_BYTES: number;
|
|
112
154
|
export declare function normalizeOgLocale(locale: string | undefined): OgWorkerLocale;
|
|
113
155
|
/** Test isolation for exercising retry after a rejected initialization promise. */
|
|
114
156
|
export declare function resetOgWorkerWasmForTesting(): void;
|
|
115
|
-
/** Test isolation: drop the raw font
|
|
157
|
+
/** Test isolation: drop the raw font cache and re-arm the warnings. */
|
|
116
158
|
export declare function resetOgWorkerFontCacheForTesting(): void;
|
|
117
|
-
/**
|
|
159
|
+
/**
|
|
160
|
+
* Introspection for tests/benchmarks: the most recent render's locale and how
|
|
161
|
+
* many of its bytes are resident (`regularBytes` / `boldBytes`: its full
|
|
162
|
+
* fonts; `subset*`: its subset objects), plus every resident object
|
|
163
|
+
* (`totalBytes`, `keys`, least recently used first).
|
|
164
|
+
*/
|
|
118
165
|
export declare function getOgWorkerFontCacheStats(): Promise<{
|
|
119
166
|
locale?: OgWorkerLocale;
|
|
120
167
|
regularBytes: number;
|
|
121
168
|
boldBytes: number;
|
|
169
|
+
subsetRegularBytes: number;
|
|
170
|
+
subsetBoldBytes: number;
|
|
171
|
+
totalBytes: number;
|
|
172
|
+
keys: string[];
|
|
122
173
|
}>;
|
|
123
174
|
/**
|
|
124
175
|
* Resolves a stored branding-logo asset to a satori/resvg-compatible data
|
|
@@ -137,6 +188,14 @@ export declare function resolveOgWorkerLogoDataUri(asset: OgWorkerLogoAsset | nu
|
|
|
137
188
|
* render with an `OgTreeRenderError` and nothing is fetched.
|
|
138
189
|
* - Fonts come from `fontBucket` by locale: Regular always, Bold when
|
|
139
190
|
* `weights` includes 700 (missing Bold ⇒ Regular + one warning per isolate).
|
|
191
|
+
* When every character of the tree is covered by the locale's subset fonts
|
|
192
|
+
* (`fonts/subset-v1/…`, ArcBlock/arc#8800) those are used instead — same
|
|
193
|
+
* pixels, a fraction of the parse; otherwise, or when the subset object is
|
|
194
|
+
* missing (one warning per isolate), the full fonts.
|
|
195
|
+
* - Characters the locale's full font does not have at all are drawn by
|
|
196
|
+
* cross-script fallback families added after it (arc#8832,
|
|
197
|
+
* `font-fallback.ts`; subset or full, within a per-render byte budget); a
|
|
198
|
+
* missing fallback object renders without it (one warning per isolate).
|
|
140
199
|
* - Runs inside the isolate-wide serial queue, so concurrent calls never
|
|
141
200
|
* parse fonts or grow the wasm heap in parallel.
|
|
142
201
|
* - No cache: callers version and cache the result themselves.
|
package/dist/og/worker.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/og/worker.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/og/worker.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAEL,KAAK,WAAW,EAOjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,kBAAkB,EAOxB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAML,K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