Name | Type | Description |
ascent [get]
|
int | Gets the maximum pixel ascent of all glyphs in this font
Ascent is the distance from the top of the glyph to the baseline
|
descent [get]
|
int | Gets the maximum pixel descent of all glyphs in this font
Descent is the distance from the bottom of the glyph to the baseline
|
faces [get]
|
long | Gets the number of faces in this font
Faces are sub-fonts that vary slightly from the main font
|
familyName [get]
|
string | Gets the font face family name (Times, Courier, etc.)
Returns null if not available
|
handle [get]
|
derelict.sdl2.ttf.TTF_Font* | Returns the raw SDL data of this object
|
height [get]
|
int | Gets the maximum pixel height of all glyphs in this font
Useful for multiline printing
|
hinting [set]
|
int | Sets the font's hinting type
Type is taken as a value matching one of the following:
TTF_HINTING_NORMAL
TTF_HINTING_LIGHT
TTF_HINTING_MONO
TTF_HINTING_NONE
Hinting type is how the font is programmed to map onto the pixels on a screen
|
hinting [get]
|
int | Gets the font's hinting type
Type is returned as a value matching one of the following:
TTF_HINTING_NORMAL
TTF_HINTING_LIGHT
TTF_HINTING_MONO
TTF_HINTING_NONE
Type defaults to TTF_HINTING_NORMAL if no type has been set
Hinting type is how the font is programmed to map onto the pixels on a screen
|
isFixedWidth [get]
|
bool | Checks if the current font face of this font is fixed-width
Fixed-width fonts are monospace - each character is the same length
The pixel length of a string of fixed-width characters is the width of the characters times the amount of characters
|
kerning [set]
|
bool | Sets the font's kerning setting
Default for newly created fonts is true
Kerning setting determines whether the spacing between individual characters is adjusted for a more pleasing result
|
kerning [get]
|
bool | Gets the font's kerning setting
Default for a newly created fonts is true
Kerning setting determines whether the spacing between individual characters is adjusted for a more pleasing result
|
lineSkip [get]
|
int | Gets the recommended pixel height of a line of text in this font
This represents the distance from the baseline to the top of the line
Line skip should be larger than height in most cases
|
outline [set]
|
int | Sets the size of the font's outline
Use outline = 0 to disable outlining
|
outline [get]
|
int | Gets the size of the font's outline
Outline is constant across glyphs in a font
|
style [set]
|
int | Sets the style (bold, italic, etc.) of this font
Style should be inputted as a bitmask composed of:
TTF_STYLE_BOLD
TTF_STYLE_ITALIC
TTF_STYLE_UNDERLINE
TTF_STYLE_STRIKETHROUGH
If the style is normal, use TTF_STYLE_NORMAL
For multiple styles, use a bitwise OR operator (TTF_STYLE_BOLD|TTF_STYLE_ITALIC means both bold and italic, etc.)
|
style [get]
|
int | Gets the style (bold, italic, etc.) of this font
Style is returned as a bitmask composed of:
TTF_STYLE_BOLD
TTF_STYLE_ITALIC
TTF_STYLE_UNDERLINE
TTF_STYLE_STRIKETHROUGH
If the style is normal, the value returned will be TTF_STYLE_NORMAL
Otherwise, use bitwise and operations to get individual values (style&TTF_STYLE_BOLD returns whether the font is bold, etc.)
|
styleName [get]
|
string | Gets the font face style name (Sans, Serif, etc.)
Returns null if not available
|