@pixldocs/canvas-renderer 0.5.143 → 0.5.145
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-CUpy7HO9.js → index-Br7Pk6Ol.js} +10 -6
- package/dist/index-Br7Pk6Ol.js.map +1 -0
- package/dist/{index-r5VzSOHa.cjs → index-DVjmPr0D.cjs} +10 -6
- package/dist/index-DVjmPr0D.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{vectorPdfExport-GvaizFte.js → vectorPdfExport-B63qQqDW.js} +105 -4
- package/dist/vectorPdfExport-B63qQqDW.js.map +1 -0
- package/dist/{vectorPdfExport-JVEe_tSQ.cjs → vectorPdfExport-C9jFFq3k.cjs} +105 -4
- package/dist/vectorPdfExport-C9jFFq3k.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/index-CUpy7HO9.js.map +0 -1
- package/dist/index-r5VzSOHa.cjs.map +0 -1
- package/dist/vectorPdfExport-GvaizFte.js.map +0 -1
- package/dist/vectorPdfExport-JVEe_tSQ.cjs.map +0 -1
|
@@ -2657,7 +2657,7 @@ async function loadFontshareFont(fontFamily, slug, weights) {
|
|
|
2657
2657
|
if (existing) return existing;
|
|
2658
2658
|
const promise = (async () => {
|
|
2659
2659
|
try {
|
|
2660
|
-
const weightStr = (weights || [300, 400, 500, 700]).join(",");
|
|
2660
|
+
const weightStr = (weights || [300, 400, 500, 600, 700]).join(",");
|
|
2661
2661
|
const url = `https://api.fontshare.com/v2/css?f[]=${slug}@${weightStr}&display=swap`;
|
|
2662
2662
|
if (document.querySelector(`link[href="${url}"]`)) return true;
|
|
2663
2663
|
const link = document.createElement("link");
|
|
@@ -14742,7 +14742,7 @@ async function registerRemoteFontFaceViaProxy(family, requestedWeight, styleRaw)
|
|
|
14742
14742
|
try {
|
|
14743
14743
|
const weightsToRegister = /* @__PURE__ */ new Set([actualWeight]);
|
|
14744
14744
|
const requestedNum = Number.isFinite(parsed) ? Math.max(100, Math.min(900, parsed)) : 400;
|
|
14745
|
-
weightsToRegister.add(requestedNum);
|
|
14745
|
+
if (requestedNum === actualWeight) weightsToRegister.add(requestedNum);
|
|
14746
14746
|
for (const w of weightsToRegister) {
|
|
14747
14747
|
const aliasKey = `${family}|${w}|${style}|${source}`;
|
|
14748
14748
|
if (registeredRemoteFontFaces.has(aliasKey)) continue;
|
|
@@ -15956,7 +15956,7 @@ function captureFabricCanvasSvgForPdf(fabricInstance, canvasWidth, canvasHeight)
|
|
|
15956
15956
|
}
|
|
15957
15957
|
return svgString;
|
|
15958
15958
|
}
|
|
15959
|
-
const PACKAGE_VERSION = "0.5.
|
|
15959
|
+
const PACKAGE_VERSION = "0.5.145";
|
|
15960
15960
|
const roundParityValue = (value) => {
|
|
15961
15961
|
if (typeof value !== "number") return value;
|
|
15962
15962
|
return Number.isFinite(value) ? Number(value.toFixed(3)) : value;
|
|
@@ -16381,7 +16381,7 @@ class PixldocsRenderer {
|
|
|
16381
16381
|
await this.waitForCanvasScene(container, cloned, i);
|
|
16382
16382
|
}
|
|
16383
16383
|
console.log(`[canvas-renderer][pdf-unified] mounted ${cloned.pages.length} page(s), handing off to client exportMultiPagePdf`);
|
|
16384
|
-
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-
|
|
16384
|
+
const { exportMultiPagePdf, preparePagesForExport } = await import("./vectorPdfExport-B63qQqDW.js");
|
|
16385
16385
|
const prepared = preparePagesForExport(
|
|
16386
16386
|
cloned.pages,
|
|
16387
16387
|
canvasWidth,
|
|
@@ -18483,7 +18483,11 @@ async function prepareLiveCanvasSvgForPdf(rawSvg, pageWidth, pageHeight, pageKey
|
|
|
18483
18483
|
if (options == null ? void 0 : options.stripPageBackground) stripRootPageBackgroundFromSvg(svgToDraw);
|
|
18484
18484
|
sanitizeSvgTreeForPdf(svgToDraw);
|
|
18485
18485
|
try {
|
|
18486
|
-
const { bakeTextAnchorPositionsFromLiveSvg } = await import("./vectorPdfExport-
|
|
18486
|
+
const { bakeTextAnchorPositionsFromLiveSvg, logTextMeasurementDiagnostic } = await import("./vectorPdfExport-B63qQqDW.js");
|
|
18487
|
+
try {
|
|
18488
|
+
await logTextMeasurementDiagnostic(svgToDraw);
|
|
18489
|
+
} catch {
|
|
18490
|
+
}
|
|
18487
18491
|
await bakeTextAnchorPositionsFromLiveSvg(svgToDraw);
|
|
18488
18492
|
} catch (e) {
|
|
18489
18493
|
console.warn("[canvas-renderer][pdf-export] anchor-bake pass failed (continuing):", e);
|
|
@@ -18828,4 +18832,4 @@ export {
|
|
|
18828
18832
|
collectFontDescriptorsFromConfig as y,
|
|
18829
18833
|
collectFontsFromConfig as z
|
|
18830
18834
|
};
|
|
18831
|
-
//# sourceMappingURL=index-
|
|
18835
|
+
//# sourceMappingURL=index-Br7Pk6Ol.js.map
|