DynamicFont
Category: Core
DynamicFont renders vector font files at runtime.
Properties
void | ( DynamicFontData data ) |
get_fallback ( idx ) const | |
int | ( ) const |
void | remove_fallback ( idx ) |
void | set_fallback ( idx, DynamicFontData data ) |
Enumerations
enum SpacingType:
- SPACING_TOP = 0 — Spacing at the top.
- SPACING_CHAR = 2 — Character spacing.
- SPACING_SPACE = 3 — Space spacing.
DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like . This trades the faster loading time of BitmapFonts for the ability to change font parameters like size and spacing during runtime. is used for referencing the font file paths.
Property Descriptions
- int extra_spacing_bottom
Setter | set_spacing(value) |
Getter | get_spacing() |
Extra spacing at the bottom in pixels.
- extra_spacing_char
Setter | set_spacing(value) |
Getter | get_spacing() |
- int extra_spacing_space
Extra space spacing in pixels.
- extra_spacing_top
Setter | set_spacing(value) |
Getter | get_spacing() |
Extra spacing at the top in pixels.
- DynamicFontData font_data
Setter | set_font_data(value) |
Getter | get_font_data() |
The font data.
- outline_color
Setter | set_outline_color(value) |
Getter | get_outline_color() |
- int size
Setter | set_size(value) |
Getter | get_size() |
The font size.
- use_filter
Setter | set_use_filter(value) |
Getter | get_use_filter() |
If , filtering is used.
- bool use_mipmaps
Setter | set_use_mipmaps(value) |
Getter | get_use_mipmaps() |
- void add_fallback ( data )
Adds a fallback font.
- DynamicFontData get_fallback ( idx ) const
Returns the fallback font at index .
- int get_fallback_count ( ) const
Returns the number of fallback fonts.
- void remove_fallback ( idx )
Removes the fallback font at index .
- void set_fallback ( int idx, data )
Sets the fallback font at index .