Function measureFontHeight

  • Measure the height of a font.


    • font: string

      The CSS font string of interest.

    Returns number

    The height of the font bounding box.


    This function uses a temporary DOM node to measure the text box height for the specified font. The first call for a given font will incur a DOM reflow, but the return value is cached, so any subsequent call for the same font will return the cached value.

Generated using TypeDoc