@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.js CHANGED
@@ -12542,6 +12542,8 @@ class PixldocsRenderer {
12542
12542
  const fabricInstance = this.getFabricCanvasFromContainer(container);
12543
12543
  const expectedImageCount = this.getExpectedImageCount(config, pageIndex);
12544
12544
  await this.waitForCanvasImages(container, expectedImageCount);
12545
+ await this.waitForStableTextMetrics(container, config);
12546
+ await this.waitForCanvasScene(container, config, pageIndex);
12545
12547
  const fabricCanvas = container.querySelector("canvas.upper-canvas, canvas");
12546
12548
  const sourceCanvas = (fabricInstance == null ? void 0 : fabricInstance.lowerCanvasEl) || container.querySelector("canvas.lower-canvas") || fabricCanvas;
12547
12549
  if (!sourceCanvas) {
@@ -12580,7 +12582,7 @@ class PixldocsRenderer {
12580
12582
  pageIndex,
12581
12583
  zoom: pixelRatio,
12582
12584
  absoluteZoom: true,
12583
- skipFontReadyWait: true,
12585
+ skipFontReadyWait: false,
12584
12586
  onReady
12585
12587
  })
12586
12588
  );
@@ -12629,6 +12631,8 @@ class PixldocsRenderer {
12629
12631
  }
12630
12632
  const expectedImageCount = this.getExpectedImageCount(config, pageIndex);
12631
12633
  await this.waitForCanvasImages(container, expectedImageCount);
12634
+ await this.waitForStableTextMetrics(container, config);
12635
+ await this.waitForCanvasScene(container, config, pageIndex);
12632
12636
  const prevVPT = fabricInstance.viewportTransform ? [...fabricInstance.viewportTransform] : void 0;
12633
12637
  const prevSvgVPT = fabricInstance.svgViewportTransformation;
12634
12638
  const prevRetina = fabricInstance.enableRetinaScaling;
@@ -12679,7 +12683,7 @@ class PixldocsRenderer {
12679
12683
  zoom: 1,
12680
12684
  // 1:1 — no UI scaling for SVG capture
12681
12685
  absoluteZoom: true,
12682
- skipFontReadyWait: true,
12686
+ skipFontReadyWait: false,
12683
12687
  onReady
12684
12688
  })
12685
12689
  );