DynamicFont

    Category: Core

    DynamicFont renders vector font files at runtime.

    Properties

    void ( DynamicFontData data )
    get_fallback ( idx ) const
    int ( ) const
    voidremove_fallback ( idx )
    voidset_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
    Setterset_spacing(value)
    Getterget_spacing()

    Extra spacing at the bottom in pixels.


    • extra_spacing_char
    Setterset_spacing(value)
    Getterget_spacing()

    • int extra_spacing_space

    Extra space spacing in pixels.


    • extra_spacing_top
    Setterset_spacing(value)
    Getterget_spacing()

    Extra spacing at the top in pixels.


    Setterset_font_data(value)
    Getterget_font_data()

    The font data.


    • outline_color
    Setterset_outline_color(value)
    Getterget_outline_color()


    Setterset_size(value)
    Getterget_size()

    The font size.


    • use_filter
    Setterset_use_filter(value)
    Getterget_use_filter()

    If , filtering is used.


    Setterset_use_mipmaps(value)
    Getterget_use_mipmaps()
    • void add_fallback ( data )

    Adds a fallback font.


    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 .