@pixldocs/canvas-renderer 0.5.29 → 0.5.30

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.cjs CHANGED
@@ -12561,6 +12561,8 @@ class PixldocsRenderer {
12561
12561
  const fabricInstance = this.getFabricCanvasFromContainer(container);
12562
12562
  const expectedImageCount = this.getExpectedImageCount(config, pageIndex);
12563
12563
  await this.waitForCanvasImages(container, expectedImageCount);
12564
+ await this.waitForStableTextMetrics(container, config);
12565
+ await this.waitForCanvasScene(container, config, pageIndex);
12564
12566
  const fabricCanvas = container.querySelector("canvas.upper-canvas, canvas");
12565
12567
  const sourceCanvas = (fabricInstance == null ? void 0 : fabricInstance.lowerCanvasEl) || container.querySelector("canvas.lower-canvas") || fabricCanvas;
12566
12568
  if (!sourceCanvas) {
@@ -12599,7 +12601,7 @@ class PixldocsRenderer {
12599
12601
  pageIndex,
12600
12602
  zoom: pixelRatio,
12601
12603
  absoluteZoom: true,
12602
- skipFontReadyWait: true,
12604
+ skipFontReadyWait: false,
12603
12605
  onReady
12604
12606
  })
12605
12607
  );
@@ -12648,6 +12650,8 @@ class PixldocsRenderer {
12648
12650
  }
12649
12651
  const expectedImageCount = this.getExpectedImageCount(config, pageIndex);
12650
12652
  await this.waitForCanvasImages(container, expectedImageCount);
12653
+ await this.waitForStableTextMetrics(container, config);
12654
+ await this.waitForCanvasScene(container, config, pageIndex);
12651
12655
  const prevVPT = fabricInstance.viewportTransform ? [...fabricInstance.viewportTransform] : void 0;
12652
12656
  const prevSvgVPT = fabricInstance.svgViewportTransformation;
12653
12657
  const prevRetina = fabricInstance.enableRetinaScaling;
@@ -12698,7 +12702,7 @@ class PixldocsRenderer {
12698
12702
  zoom: 1,
12699
12703
  // 1:1 — no UI scaling for SVG capture
12700
12704
  absoluteZoom: true,
12701
- skipFontReadyWait: true,
12705
+ skipFontReadyWait: false,
12702
12706
  onReady
12703
12707
  })
12704
12708
  );