createFontMeasurer()
function createFontMeasurer(fonts, fallback?): Promise<TextMeasurer>;Builds a text measurer that uses the real metrics of registered fonts and
falls back to standard font metrics for other families. Characters the
requested font lacks are measured with the font the PDF uses for them.
Pass the same fonts to generateReport (via this measurer) and to
exportPdf so line breaks in the PDF match the layout.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
fonts |
FontRegistration[] |
fallback? |
TextMeasurer |
Returns
Section titled “Returns”Promise<TextMeasurer>