Skip to content

createStandardFontMeasurer()

function createStandardFontMeasurer(): TextMeasurer;

Measures text with the AFM metrics of the 14 PDF standard fonts, including kerning. This is the same computation pdf-lib uses, so line breaks in the viewer and in exported PDFs match.

TextMeasurer