How to use and manage fonts
Fonts are defined as type Ogre::Font, and can be defined in .fontdef scripts. QuickGUI does
minimal scaling of fonts; all glyphs of a font are roughly the same size as the glyphs rendered by
FreeType. Because of this, it is recommended you create many fonts for use in your UI, with the size
included in the name for uniqueness and easy organization. For example:
acmesa.fontdef:
Copy to clipboard
acmesa.10 { type truetype source acmesa.ttf size 10 resolution 72 } acmesa.12 { type truetype source acmesa.ttf size 12 resolution 72 } acmesa.14 { type truetype source acmesa.ttf size 14 resolution 72 }
Fonts also support code point range, which are useful for non English languages. Make sure to call
GUIManager::setSupportedCodePoints to tell QuickGUI what codepoints are acceptable character injections.
It is important to note that Characters that are too big for their TextBounds will be clipped according to the Widget's client dimensions.