Ultralight
1.0.0
A fast, lightweight, HTML UI engine for native apps.
|
Font Loader interface, used for all font lookup operations. More...
#include <FontLoader.h>
Public Member Functions | |
virtual String16 | fallback_font () const =0 |
Fallback font family name. More... | |
virtual String16 | fallback_font_for_characters (const String16 &characters, int weight, bool italic, float size) const =0 |
Fallback font family name that can render the specified characters. More... | |
virtual Ref< Buffer > | Load (const String16 &family, int weight, bool italic, float size)=0 |
Get the actual font file data (TTF/OTF) for a given font description. More... | |
Font Loader interface, used for all font lookup operations.
Every operating system has its own library of installed system fonts. The FontLoader interface is used to lookup these fonts and fetch the actual font data (raw TTF/OTF file data) given a certain font description.
You can override this interface to bundle your own fonts or override the default system font loading behavior.
This is intended to be implemented by users and defined before creating the Renderer.
Definition at line 34 of file FontLoader.h.
|
pure virtual |
Fallback font family name.
Will be used if all other fonts fail to load.
|
pure virtual |
Fallback font family name that can render the specified characters.
This is mainly used to support CJK (Chinese, Japanese, Korean) text display.
characters | One or more UTF-16 characters. This is almost ALWAYS a single character. |
weight | Font weight. |
italic | Whether or not italic is requested. |
size | Font size. |
|
pure virtual |
Get the actual font file data (TTF/OTF) for a given font description.
family | Font family name. |
weight | Font weight. |
italic | Whether or not italic is requested. |
size | Font size. |