Measuring how much text fits before the browser renders it.
To place text on a slide you have to know it fits before you draw it. Measuring with a canvas, wrapping Unicode correctly, and correcting for the gap between canvas and DOM.
To place text on a slide you have to know it fits before you draw it. Measuring with a canvas, wrapping Unicode correctly, and correcting for the gap between canvas and DOM.
Rasterizing an SVG to PNG through an image element races the font load and usually loses, so the export comes out in a fallback font. The fix is to convert text to vector paths before rasterizing, with HarfBuzz for shaping.