Table of Contents

orxTEXT structure

Summary

Text

[TextTemplate]
String = "string to display"
Font   = FontTemplate

Font

[FontTemplate]
Texture            = path/to/ImageFile.ext
TextureOrigin      = <vector>
TextureSize        = <vector>
KeepInCache        = <bool>
CharacterList      = "ordered list of character"
CharacterSize      = <vector>
CharacterHeight    = <float>
CharacterWidthList = <float>
CharacterSpacing   = <vector>

Details

Text

Here's a list of available properties for an orxTEXT structure:

Here's a small example.

[Text1]
String = This is our first text
Font   = Font1
 
[Text2]
String = $Greetings
Font   = $FontKey
 
[MultilineText]
String = "First line
Second line"
Font   = Font1

Text1 has a static plain text content with a static custom font called Font1 whereas Text2 points to the localization keys named Greetings for its text content and FontKey for its font. This means that its content and font are defined in the orxLOCALE module and will always be expressed according to the current selected language.

NB: If the current language is changed at runtime, the text's content and font will be automagically updated without requiring any code.

Font

Here's a list of available properties for an orxFONT structure:

An example of how to use custom fonts can be found in the localization tutorial 2).

orxFontGen

orxFontGen is a command-line tool that ships with Orx which allows you create bitmap fonts which can be define with the configuration detailed above. It can be found in the orx/tools/orxFontGen/bin folder. Available to compile for Windows, Linux and Mac. To learn how to use it follow the orxFontGen tutorial.

Latest config settings for the Development Version

We endeavor to keep the config properties on this page up to date as often as possible. For up to the minute config information for the latest version of Orx, check the most recent published at:

CreationTemplate.ini and

SettingsTemplate.ini

Additionally these files can be found under your orx source tree in the orx/code/bin folder.

1)
such as '#', ';', '“', '~', '$', …
2)
at the end of 10_Locale.ini