FontTypeFace

Group
player
Methods
3
Fields
None

Getting one

chatboxPanelManager:getContainerWidget():getFont()

Methods

MethodReturnsDescription
getTextWidth(string?)numberThe width, in pixels, the client lays text out at in this font: each char's glyph advance, <img=n> a mod icon's width, other tags (`<co…
getBaseline()numberThe ascent: how far below the top of a line its baseline is.
equals(any)booleanWhether other equals this FontTypeFace, as == answers it (false for a value of another class).

Returned by

MethodReturnsDescription
Widget.getFontFontTypeFace?The font the text is drawn in, nil when the font id is -1 or names no font of the game's font archive (as the client's: it loads none).

Method details

getTextWidth

getTextWidth: (FontTypeFace, string?) -> number

The width, in pixels, the client lays text out at in this font: each char's glyph advance, <img=n> a mod icon's width, other tags (<col=...>, <br>, ...) and @word@ colour codes nothing; 0 for nil.

equals

equals: (FontTypeFace, any) -> boolean

Whether other equals this FontTypeFace, as == answers it (false for a value of another class).