-
Notifications
You must be signed in to change notification settings - Fork 25
Setting up a font
Since v0.9-beta-8, font data is stored in a separate prefab.
Fonts consist of a container prefab, one dynamic font file and one unicode font file. The dynamic font file is only used in OGTextField, so you can optionally omit this one if you won't use it.
OpenGUI
| -- Fonts
| | -- Ubuntu
| | -- Ubuntu-R.prefab
| | -- Ubuntu-R_dynamic.font
| | -- Ubuntu-R_unicode.font
The OGFont prefab (here portrayed as Ubuntu-R.prefab) takes the *_dynamic and the *_unicode as variables in the inspector. For the purposes of this guide I will use 48 as my bitmap font size. Your mileage may vary, so play around with that until you get what you want.
The *_unicode font needs these import settings:
- Font size: 48
- Rendering mode: Smooth
- Character: Unicode
The *_dynamic font needs these import settings:
- Font size: 48
- Character: Dynamic
The "size" parameter of the OGFont object: 48
You need to press the "Update" button after you link the font files to the OGFont prefab in the inspector.
Remember to add your new OGFont prefab to your OGSkin, otherwise no text will be displayed.