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

The STRINGS file contains a list of strings to be rendered into alpha textures at compile time. Using pre-rendered strings can speed up the OpenGL rendering cycle as only one texture is used per string. The format of the file entries is:

<ttf font name> <point size> "text" <label>

The font name refers to a truetype font in the ./fonts framework subdirectory, and label is the identifier used within the application. For example:

cmss.ttf 24 '$/lambda$Native HelloWorld slash_/this' title

This will render the string at a point size of 24 using the Computer Modern Sans Serif font and generate a texture title.img that can be used in the application code.

Strings are rendered using unicode xelatex. LaTeX commands use forward slashes in order to prevent shell parsing issues, and forward slashes can be escaped with an underscore prefix.

Clone this wiki locally