weasel API - v0.8.0
    Preparing search index...

    Function measuredWidth

    • Advance width of text in world units, tracking included.

      letter-spacing is not part of the CSS font shorthand, so a context whose font was set from fontString(style) measures glyphs only. The GL path (layoutRuns) adds letterSpacing after every code point including the last, matching CSS, so this does too — and every 2D-side width has to go through here or the two paths disagree about where a line breaks.

      Parameters

      Returns number