Skip to content
Chris Petersen edited this page Aug 8, 2013 · 5 revisions

The FONTS file lists the fonts and point sizes to be used by the application. The format is:

<ttf font name> <bit depth> <comma separated point sizes> <label>

The font name is the file name of a truetype font located in the ./fonts framework subdirectory. The bit depth is either 7 or 8 for plain or extended ascii, respectively. The label is used to refer to the font in the source code. Multiple fonts can be specified on separate lines.

For example:

helvetica.ttf 7 12,16,24 myfont

will generate three point sizes of plain ascii Helvetica, which can be accessed in the source code as myfont_12.fnt, myfont_16.fnt and myfont_24.fnt.

Fonts are processed into a single texture atlas of the smallest size possible to pack all characters in it. An error will be generated if it is not possible to pack all the requested character sizes into a texture smaller or equal to 1024x1024.

Clone this wiki locally