DynamicFont renders vector font files at runtime.
    public class DynamicFont : Font

DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like BitmapFont. This trades the faster loading time of BitmapFonts for the ability to change font parameters like size and spacing during runtime. DynamicFontData is used for referencing the font file paths.

Inheritance Chain

Constructors

    public DynamicFont()

Properties

    public int ExtraSpacingBottom { get; set; }

Extra spacing at the bottom in pixels.

    public int ExtraSpacingChar { get; set; }

Extra character spacing in pixels.

    public int ExtraSpacingSpace { get; set; }

Extra space spacing in pixels.

    public int ExtraSpacingTop { get; set; }

Extra spacing at the top in pixels.

    public DynamicFontData FontData { get; set; }

The font data.

    public int Size { get; set; }

The font size.

    public bool UseFilter { get; set; }

If true filtering is used.

    public bool UseMipmaps { get; set; }

If true mipmapping is used.

Methods

    public void AddFallback(DynamicFontData data)

Adds a fallback font.

    public DynamicFontData GetFallback(int idx)

Returns the fallback font at index idx.

    public int GetFallbackCount()

Returns the number of fallback fonts.

    public DynamicFontData GetFontData()

Getter for FontData

    public int GetSize()

Getter for Size

    public int GetSpacing(int type)

    public bool GetUseFilter()

Getter for UseFilter

    public bool GetUseMipmaps()

Getter for UseMipmaps

    public void RemoveFallback(int idx)

Removes the fallback font at index idx.

    public void SetFallback(int idx, DynamicFontData data)

Sets the fallback font at index idx.

    public void SetFontData(DynamicFontData data)

Setter for FontData

    public void SetSize(int data)

Setter for Size

    public void SetSpacing(int type, int value)

    public void SetUseFilter(bool enable)

Setter for UseFilter

    public void SetUseMipmaps(bool enable)

Setter for UseMipmaps

Inner Types

SpacingType

Name Value Description
Top 0 Spacing at the top.
Bottom 1 Spacing at the bottom.
Char 2 Character spacing.
Space 3 Space spacing.
Tags: