font.measure

Revision as of 20:39, 3 October 2019 by Mex (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Method Client Only icon-iii.png icon-vc.png icon-sa.png icon-iv.png Online and Offline

Available since Client 1.0.0

Vec2 font.measure(string text, float width, float align, float justify, float size, [ bool wordWrap = false, bool colourCodes = true ])

The font.measure method is used to measure, in pixels, the 2D size of the text using a font.

Parameters

1) string text The text to measure the size of.
2) float width The maximum width to check.
3) float align The horizontal alignment of the text, as a float.
4) float justify The justify alignment of the text, as a float.
5) float size The size of the text, as a float.
6) bool wordWrap Optional, defaults to false. Whether word wrap is enabled.
7) bool colourCodes Optional, defaults to true. Whether colour codes are resolved.

Return

Vec2 The width and height of the text as a Vec2, in pixels.

Types

Client Font

Notes

There aren't any notes for this method.

Examples

There aren't any examples for this method.

Compatibility

There isn't any compatibility information for this method.

Related

Client Related

        font.measure
        font.render
        font.size