|
HikoGUI
A low latency retained GUI
|
Text shaping and editing is done on a per-grapheme-cluster basis, graphemes clusters are defined in "UAX #29 Unicode Text Segmentation".
Inside Hikogui a grapheme can be used in a std::basic_string. A grapheme is 21 bits, where grapheme clusters larger than one code-point get a temporary and unique-id assigned to the invalid unicode planes 17-31.
A text-style is actually a set of styles for different text-categories, languages and scripts. The text-category is a mask, the language may be empty meaning a whildcard; and script may be 'zzzz' meaning a whildcard. This allows for at least one of the sub-styles to be a fallback.
| Name | Cmd | Description |
|---|---|---|
| Abbreviation | a | An abbreviation, shown in a different style to show there is a definition somehwere. |
| Bold | b | Show text in bold, without the text being "strong" |
| Code | c | A (sub-)expression of computer-language-code, Often shown in a non-proportional font. |
| Emphesis | e | Text with stressed emphesis. Spoken with clear articulation. Often shown in italic. |
| Help | h | Used to highlight text, like using a physical yellow marker. |
| Italic | i | Show text in italic, without the text beging "emphesis" |
| Key | k | Used in help messages to show which key to press. |
| Link | l | A link |
| Math | m | A mathematical (sub-)expression. Often shown in a special italic math font. |
| Quote | q | A citation of a title, or a quote. |
| Regular | r | The default, neutral phrasing |
| Strong | s | Text with more importance, warning, urgend. Spoken louder. Often shown in bold. |
| Underline | u | Unarticulated text. Often shown as regular underlined. |
The state-machine has the following variables:
Switch for emphasis phrasing to regular phrasing.
Read the "label" text-style, then switch to bold phrasing
Select medium weight "Times New Roman" font, Select 12 pt, Set a mask for regular phrasing for all languages. Write the "test' text-style all current masks, then delete all masks.