Font@ UI::LoadFont(const string&in filename, float size = 16.0f, int minChars = - 1, int maxChars = - 1, bool fallback = false, bool fallbackExtendedIcons = false, bool fallbackArial = false)
Loads a font for use in the UI API. Note that fonts can take up a lot of memory, so be careful in how many characters you request here! The defaults are usually enough.
string
filename
The path of the font to load. Must be relative to the root of your plugin. For legacy reasons, this can also be the user fonts folder, or Openplanet's own fonts folder.
float
size
The size of the font in pixels. The size is automatically scaled by UI::GetScale().
int
minChars
The first character to add to the font. Use -1 to start from 0x20.
int
maxChars
The last character to add to the font. Use -1 to end at 0xFF.
bool
fallback
Whether to load icon fonts as a fallback. Warning: Don't use fallback fonts if you don't need them! Fallback fonts cost a lot of memory!
bool
fallbackExtendedIcons
Whether to load extended icons (emojis & symbols) as part of the fallback. For this to work, fallback
must be true.
bool
fallbackArial
Whether to load Arial as part of the fallback. This allows for many more Unicode characters to render. For this to work, fallback
must be true.
UI::Font@