Text Style Palette
Using the Text Style Palette section from the Solution Options ("File" > "Solution Options"), it is possible to create, edit and delete different text style templates.

If there are no fonts imported already, the user can import any available fonts using the "Import Fonts" button in the upper-right corner of the Text Style Palette section. The button will open the "Import Fonts" panel which can also be opened by using the "Import" > "Import Fonts" menu.

Text Styles are necessary for nodes and controls that display texts. E.g. 2D Text Node has a property "Style", Controls like the Text Control and the Text Button Control have a property "TextStyle". These properties can be used to configure the style of the displayed texts by setting a TextStyle.

A click on the magnifying glass icon will open the Text Style Palette.
Adding a new TextStyle
To add a new TextStyle press the Add TextStyle button, which will open the Add New Text Style dialog

Please refer to Font Palette for detailed information about the "Default font" field.
For any newly created text style there are four different sections that can be seen on the right side of the panel:
- Text Style
- Metrics
- General
- Asset
Under the "Text Style" section another sub-sections are available:
- Entries
- Cultures
It is possible to configure the fonts based on both unicode ranges and on the basis of language. In other words, the font selection can be conditioned by language ISO codes (the standardized nomenclature used to classify languages).
In the "Entries" section different fonts that will be used for any text edited in SceneComposer can be set. First, a new child has to be added using the "+" button. Any child can be deleted or moved (up or down). For every new child there are three main properties which should be set:
- bounds (lower and upper)
- font (used later on)

The bounds of the entry represent the ASCII decimal values which are equivalents of all the letter of the Latin alphabet (65 to 90 - capital letters from A to Z; 97 to 122 - lower cases). If, for a specific selected font, the selected bounds will be 65 ( = U+0041) for the lower and 90 ( = U+005A) for the upper, all the capital letters from a text which uses that style will be drawn with that specific chosen font.
-
After any bound has been set in decimal values, when push "Enter" those values will be automatically transformed into the coresponding ISO codes. For instance, if the lower bound is set as 3311, after press "Enter" it will be automatically displayed as the "U+0CEF" ISO Code. If the lower bound is set as 200000, it will be automatically displayed as the "U+1E8480" ISO Code.
In the "Cultures" section different entries can be set exactly in the same manner as mentioned above. In this way all the text style entries are grouped by culture.
- See also:
-
- Culture Setting in SceneComposer User Manual

In the image below different cultures and entries can be seen (Click to enlarge image).
It is possible, if desired, to create a style which uses a specific font associated for any letter.

- The "Text Style" section has a great importance because of the selection of the main font used in association of a created style.
- The "Metrics" section presents font line spacing information:
- Ascender: defines the part of a lower-case letter that is taller than the font's x-height
- Descender: defines the portion of a letter that extends below the baseline of a font.
- Line Height: represents the vertical distance between lines of text
lineGap = lineHeight - (ascender - descender)

- The "General" section provides all the necessary information about the created style: Name, Description, Icon and so forth.
- The "Asset" section provides information about exporting, Id, Symbolic name, and Candera name and path.
To find the cultures that are used and the fonts that were set, a verification is done until a valid configuration is found. The codepoint resolution is done according to rules verified in the following order:
- Check if Active Culture is in the Culture list of the current TextStyle
- Check if Active Culture is in the Culture list of the Base Style
- Configuration of Entries in current Text Style
- Configuration of Entries in Base Style
- Default Font from current Text Style
- Default Font from Base Style
If none of the above checkings will give any result, the default code point will be used.
