-
Notifications
You must be signed in to change notification settings - Fork 86
STRINGS
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. Two forward slashes will insert a new line, and a forward slash can be escaped with an underscore prefix.
An optional Script
parameter can be used for rendering combined characters from a given script. Make sure that the font you use contains the necessary characters. For example, the following renders the translation of the word "yes" in Khmer with proper combining of characters, unlike the circles that appear here on the wiki.
Busra-R.ttf 24 'រឹមត្រូវ' yes Script=Khmer
Using the created texture in a (glgui-pixmap):
(set! gui (make-glgui))
(glgui-pixmap gui 10 10 yes.img White)
-
- accelerometer
- alist
- audio
- audioaux
- base64
- btle-scan
- camera
- cdb
- cgi
- config
- csv
- curl
- digest
- dmtx
- download
- eventloop
- fcgi
- fft
- generalized-arrays
- gps
- graph
- gyro
- hidapi
- hpdf
- html
- httpsclient
- hybridapp
- json
- lmdb
- ln_core
- ln_glcore
- ln_glgui
- ln_store
- localization
- localization_gui
- localnotification
- magnetometer
- mdns
- mqtt
- mqtt-store
- multitouch
- oauth
- orientation
- p256ecdsa
- png
- portaudio
- pregexp
- pressure
- prime
- pushnotification
- redcap
- rsa
- rtaudio
- rupi
- rotation
- sanestring
- scheduler
- serial
- sets
- settings
- simplexnoise
- sqlite
- ssax
- syntax-case
- timestamp
- ttf
- uiform
- url
- uuid
- vibrate
- videoplayer
- watchdog
- website
- xml
- zip