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 Text Style
To add a new TextStyle press the Add text style 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 created text style there are four different sections that can be seen on the right side of the Text Style Palette window:
- 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 can be set that will be used for any text edited in SceneComposer. 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, those values will be automatically transformed into the corresponding ISO codes when the "Enter" key is pressed. For instance, if the lower bound is set as 3311, after pressing "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 added 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 to create a style which uses a specific font associated for any letter if desired.

- The "Text Style" section has a great importance because of the selection of the main font used in association with 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 checks will give any result, the default code point will be used.
Text Style Editor
There are two ways to open the Text Style Editor:
- Select a TextStyle in the Text Style Palette and press the Edit text style button, which will open the Text Style Editor.
- Double-click on a TextStyle in the Solution Explorer panel.
- Select a TextStyle in the Solution Explorer panel and choose Edit from the context menu.

TextStyles from the ConstructionKit are not editable.
The Text Style Editor is a dialog that is focused on editing Text Style properties. It provides three sections, which can also be found in the Properties panel:
- Text Style properties
- Entries
- Cultures

Every TextStyle is based on a Default Font. The default font can be changed by clicking on the magnifying-glass icon on the right side. This will open the Font Palette dialog, where you can select a default font from a choice box.

The items in the "Entries" and "Cultures" section can be edited using the little toolbars on the right.

When sorting within Cultures, only items within the same culture can be sorted.
e.g. In the capture on the left, user can swap the 2nd and 3rd rows, but user cannot swap the 1st and 2nd rows.
Text Style Entry Editor
The Text Style Entry Editor is used to add or edit an item. It is opened when
Font
Pressing the magnifying glass icon will open the Font Palette dialog, offering the possibility to select a new font.



Select Culture
When you are editing an entry from the Cultures section (lower section) of the Text Style Editor, the appropriate Culture can be selected using this drop down box.
When editing an entry from the Entries section (top section) of the Text Style Editor, the drop down box will be disabled and no culture can be selected.
Enter Lower or Upper Bound
The Lower and Upper Bounds of the Text Style Entry can be entered into these two input fields.
Check/Uncheck to Edit Bounds
The lower section of the Text Style Entry Editor offers a list, where you can choose your upper and lower bounds by checking or unchecking the checkboxes.
Values greater than U+010000 are plane units.
