User Tools

Site Tools


en:tutorials:ui:nuklear_font_management

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:tutorials:nuklear_font_management [2020/05/20 12:59 (4 years ago)] – created zgcrownoen:tutorials:ui:nuklear_font_management [2020/08/31 09:34 (4 years ago)] (current) – ↷ Links adapted because of a move operation 40.77.167.199
Line 1: Line 1:
 ====== Nuklear Font Management ====== ====== Nuklear Font Management ======
-This article assumes you have already [[en:tutorials:nuklear|created a project with Nuklear integration]]. Once you've done so, you can return here for help with adding your own fonts via config, and utilizing those fonts code-side.+This article assumes you have already [[en:tutorials:ui:nuklear|created a project with Nuklear integration]]. Once you've done so, you can return here for help with adding your own fonts via config, and utilizing those fonts code-side.
 ===== Config ===== ===== Config =====
 Somewhere within your config files, you will need to add a section like the following: Somewhere within your config files, you will need to add a section like the following:
Line 14: Line 14:
 Here, FontSize, GlobalAlpha and SegmentCount override some of ORX's default Nuklear settings, and FontList is the list of all fonts (named by you) you wish to use in your project. After FontList, you need to declare attributes named after //each// of the fonts included in FontList; each of these must contain two elements, the first of which is the path to the TrueType font you wish to use, and the second of which is the font size you wish to set for that font. Here, FontSize, GlobalAlpha and SegmentCount override some of ORX's default Nuklear settings, and FontList is the list of all fonts (named by you) you wish to use in your project. After FontList, you need to declare attributes named after //each// of the fonts included in FontList; each of these must contain two elements, the first of which is the path to the TrueType font you wish to use, and the second of which is the font size you wish to set for that font.
  
-Note that if you wish to trim the file path sizes of these TrueType fonts, all you need to do is add a Nuklear attribute to your resource section, as follows:+Note that if you wish to trim the file path sizes of these TrueType fonts, all you need to do is add a "Font" attribute to your resource section, as follows:
 <code INI> <code INI>
 [Resource] [Resource]
-Nuklear = ../data/fonts1 # ../data/fonts2+Font = ../data/fonts1 # ../data/fonts2
 </code> </code>
 where "../data/fonts1" and "../data/fonts2" are folders in which any of the TrueType fonts you wish to use can be found. where "../data/fonts1" and "../data/fonts2" are folders in which any of the TrueType fonts you wish to use can be found.
en/tutorials/ui/nuklear_font_management.1590004745.txt.gz · Last modified: 2020/05/20 12:59 (4 years ago) by zgcrowno