.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the DynamicFont.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_DynamicFont: DynamicFont =========== **Inherits:** :ref:`Font` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` **Category:** Core Brief Description ----------------- DynamicFont renders vector font files at runtime. Member Functions ---------------- +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_fallback` **(** :ref:`DynamicFontData` data **)** | +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`DynamicFontData` | :ref:`get_fallback` **(** :ref:`int` idx **)** const | +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_fallback_count` **(** **)** const | +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_fallback` **(** :ref:`int` idx **)** | +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_fallback` **(** :ref:`int` idx, :ref:`DynamicFontData` data **)** | +------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ Member Variables ---------------- .. _class_DynamicFont_extra_spacing_bottom: - :ref:`int` **extra_spacing_bottom** - Extra spacing at the bottom in pixels. .. _class_DynamicFont_extra_spacing_char: - :ref:`int` **extra_spacing_char** - Extra character spacing in pixels. .. _class_DynamicFont_extra_spacing_space: - :ref:`int` **extra_spacing_space** - Extra space spacing in pixels. .. _class_DynamicFont_extra_spacing_top: - :ref:`int` **extra_spacing_top** - Extra spacing at the top in pixels. .. _class_DynamicFont_font_data: - :ref:`DynamicFontData` **font_data** - The font data. .. _class_DynamicFont_size: - :ref:`int` **size** - The font size. .. _class_DynamicFont_use_filter: - :ref:`bool` **use_filter** - If ``true`` filtering is used. .. _class_DynamicFont_use_mipmaps: - :ref:`bool` **use_mipmaps** - If ``true`` mipmapping is used. Enums ----- .. _enum_DynamicFont_SpacingType: enum **SpacingType** - **SPACING_TOP** = **0** --- Spacing at the top. - **SPACING_BOTTOM** = **1** --- Spacing at the bottom. - **SPACING_CHAR** = **2** --- Character spacing. - **SPACING_SPACE** = **3** --- Space spacing. Description ----------- DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like :ref:`BitmapFont`. This trades the faster loading time of :ref:`BitmapFont`\ s for the ability to change font parameters like size and spacing during runtime. :ref:`DynamicFontData` is used for referencing the font file paths. Member Function Description --------------------------- .. _class_DynamicFont_add_fallback: - void **add_fallback** **(** :ref:`DynamicFontData` data **)** Adds a fallback font. .. _class_DynamicFont_get_fallback: - :ref:`DynamicFontData` **get_fallback** **(** :ref:`int` idx **)** const Returns the fallback font at index ``idx``. .. _class_DynamicFont_get_fallback_count: - :ref:`int` **get_fallback_count** **(** **)** const Returns the number of fallback fonts. .. _class_DynamicFont_remove_fallback: - void **remove_fallback** **(** :ref:`int` idx **)** Removes the fallback font at index ``idx``. .. _class_DynamicFont_set_fallback: - void **set_fallback** **(** :ref:`int` idx, :ref:`DynamicFontData` data **)** Sets the fallback font at index ``idx``.