Go to the source code of this file.
◆ ULFontLoaderGetFallbackFont
typedef ULString(* ULFontLoaderGetFallbackFont) () |
Fallback font family name.
Will be used if all other fonts fail to load.
- Note
- This font should be guaranteed to exist (eg, ULFontLoader::load should not fail when when passed this font family name).
-
The returned ULString instance will be consumed (ulDestroyString will be called on it).
◆ ULFontLoaderGetFallbackFontForCharacters
typedef ULString(* ULFontLoaderGetFallbackFontForCharacters) (ULString characters, int weight, bool italic) |
Fallback font family name that can render the specified characters.
This is mainly used to support CJK (Chinese, Japanese, Korean) text display.
- Parameters
-
characters | One or more UTF-16 characters. This is almost always a single character. |
weight | Font weight. |
italic | Whether or not italic is requested. |
- Returns
- Should return a font family name that can render the text. The returned ULString instance will be consumed (ulDestroyString will be called on it).
◆ ULFontLoaderLoad
Get the actual font file data (TTF/OTF) for a given font description.
- Parameters
-
family | Font family name. |
weight | Font weight. |
italic | Whether or not italic is requested. |
- Returns
- A font file matching the given description (either an on-disk font filepath or an in-memory file buffer). You can return NULL here and the loader will fallback to another font.