@pixldocs/canvas-renderer 0.5.138 → 0.5.139
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-D-I6bYGU.js → index-O3SyxMKA.js} +21 -11
- package/dist/{index-D-I6bYGU.js.map → index-O3SyxMKA.js.map} +1 -1
- package/dist/{index-CkbBhnZd.cjs → index-nnyTwr9Y.cjs} +21 -11
- package/dist/{index-CkbBhnZd.cjs.map → index-nnyTwr9Y.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-BGqNP_R0.js → vectorPdfExport-Cj8x52ZL.js} +4 -4
- package/dist/{vectorPdfExport-BGqNP_R0.js.map → vectorPdfExport-Cj8x52ZL.js.map} +1 -1
- package/dist/{vectorPdfExport-Bw9l0p9C.cjs → vectorPdfExport-GD7LeQPa.cjs} +4 -4
- package/dist/{vectorPdfExport-Bw9l0p9C.cjs.map → vectorPdfExport-GD7LeQPa.cjs.map} +1 -1
- package/package.json +1 -1
|
@@ -14740,14 +14740,24 @@ async function registerRemoteFontFaceViaProxy(family, requestedWeight, styleRaw)
|
|
|
14740
14740
|
const dataUri = await fetchFontProxyDataUri(family, actualWeight, style, source);
|
|
14741
14741
|
if (!dataUri) continue;
|
|
14742
14742
|
try {
|
|
14743
|
-
const
|
|
14744
|
-
|
|
14745
|
-
|
|
14746
|
-
|
|
14747
|
-
|
|
14748
|
-
|
|
14749
|
-
|
|
14750
|
-
|
|
14743
|
+
const weightsToRegister = /* @__PURE__ */ new Set([actualWeight]);
|
|
14744
|
+
const requestedNum = Number.isFinite(parsed) ? Math.max(100, Math.min(900, parsed)) : 400;
|
|
14745
|
+
weightsToRegister.add(requestedNum);
|
|
14746
|
+
for (const w of weightsToRegister) {
|
|
14747
|
+
const aliasKey = `${family}|${w}|${style}|${source}`;
|
|
14748
|
+
if (registeredRemoteFontFaces.has(aliasKey)) continue;
|
|
14749
|
+
try {
|
|
14750
|
+
const face = new FontFace(family, `url("${dataUri}")`, {
|
|
14751
|
+
weight: String(w),
|
|
14752
|
+
style
|
|
14753
|
+
});
|
|
14754
|
+
await face.load();
|
|
14755
|
+
document.fonts.add(face);
|
|
14756
|
+
appendDataUriFontFaceRule(family, w, style, dataUri);
|
|
14757
|
+
registeredRemoteFontFaces.add(aliasKey);
|
|
14758
|
+
} catch {
|
|
14759
|
+
}
|
|
14760
|
+
}
|
|
14751
14761
|
return true;
|
|
14752
14762
|
} catch {
|
|
14753
14763
|
}
|
|
@@ -16364,7 +16374,7 @@ class PixldocsRenderer {
|
|
|
16364
16374
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16365
16375
|
}
|
|
16366
16376
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
16367
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
16377
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-Cj8x52ZL.js");
|
|
16368
16378
|
const prepared = preparePagesForExport(
|
|
16369
16379
|
cloned.pages,
|
|
16370
16380
|
canvasWidth,
|
|
@@ -18462,7 +18472,7 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
18462
18472
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
18463
18473
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
18464
18474
|
try {
|
|
18465
|
-
const { bakeTextAnchorPositionsFromLiveSvg } = await import("./vectorPdfExport-
|
|
18475
|
+
const { bakeTextAnchorPositionsFromLiveSvg } = await import("./vectorPdfExport-Cj8x52ZL.js");
|
|
18466
18476
|
await bakeTextAnchorPositionsFromLiveSvg(svgToDraw);
|
|
18467
18477
|
} catch (e) {
|
|
18468
18478
|
console.warn("[canvas-renderer][pdf-export] anchor-bake pass failed (continuing):", e);
|
|
@@ -18807,4 +18817,4 @@ export {
|
|
|
18807
18817
|
collectFontDescriptorsFromConfig as y,
|
|
18808
18818
|
collectFontsFromConfig as z
|
|
18809
18819
|
};
|
|
18810
|
-
//# sourceMappingURL=index-
|
|
18820
|
+
//# sourceMappingURL=index-O3SyxMKA.js.map
|