ifFont

Implemented by

NameDescription
roFontroFont represents a particular font, from a font-family (eg. Arial), with a particular pixel size (e.g 20), and a particular boldness or italicness

Supported methods

GetOneLineHeight() as Integer

NameTypePossible ValuesDescription
GetOneLineHeightIntegerNumber of pixels) as IntgerReturns the number of pixels from one line to the next when drawing with this font

GetOneLineWidth(text as String, MaxWidth as Integer) as Integer

NameTypeParametersPossible ValuesDescription
GetOneLineWidthInteger
NameType
MaxWidthInteger
textString
Number of pixels as IntegerReturns the width in pixels occupied by the text (this is capped at the maximum provided value).

Each glyph and the needed spacing between glyphs is measured. The returned number of pixels will be no larger than MaxWidth. MaxWidth is generally the number of pixels available for rendering on this line.

GetAscent() as Integer

NameTypePossible ValuesDescription
GetAscentIntegerPixel value as IntgerReturns the font ascent in pixels

GetDescent() as Integer

NameTypePossible ValuesDescription
GetDescentIntegerPixel value as IntegerReturns the font descent in pixels

GetMaxAdvance() as Integer

NameTypePossible ValuesDescription
GetMaxAdvanceIntegerPixel value as IntegerReturns the font maximum advance width in pixels