UI module

text_width

procedure · 1 overloadsince 0.31.0Source

The width in points of string drawn with style, without kerning.

text_width :: (
    text: *Text_System,
    string_to_measure: string,
    style: Text_Style
) -> float

The width in points of string drawn with style, without kerning.

Parameters

text: *Text_System
the text system holding the fonts.
string_to_measure: string
the UTF-8 text to measure.
style: Text_Style
the font and size to measure with.

Returns

float

See also