Measures text with Pretext, in the fonts the page has, for laying out a document's pages in a browser. Pretext needs
a canvas to measure with, an OffscreenCanvas or a page's, so it doesn't work in Node.
Load the fonts first, such as with document.fonts.load("11pt Calibri"): until a font has loaded, the browser
measures text in another, and Pretext keeps the widths it measured.
Measures text with Pretext, in the fonts the page has, for laying out a document's pages in a browser. Pretext needs a canvas to measure with, an
OffscreenCanvasor a page's, so it doesn't work in Node.Load the fonts first, such as with
document.fonts.load("11pt Calibri"): until a font has loaded, the browser measures text in another, and Pretext keeps the widths it measured.