|
HikoGUI
A low latency retained GUI
|
#include <TTauri/Text/UnicodeData.hpp>
Public Member Functions | |
| UnicodeData (nonstd::span< std::byte const > bytes) | |
| Load binary unicode data. | |
| UnicodeData (std::unique_ptr< ResourceView > view) | |
| Load binary unicode data from a resource. | |
| UnicodeData (UnicodeData const &other)=delete | |
| UnicodeData & | operator= (UnicodeData const &other)=delete |
| UnicodeData (UnicodeData &&other)=delete | |
| UnicodeData & | operator= (UnicodeData &&other)=delete |
| std::u32string | toNFD (std::u32string_view text, bool decomposeLigatures=false) const noexcept |
| Convert text to Unicode-NFD normal form. | |
| std::u32string | toNFC (std::u32string_view text, bool decomposeLigatures=false, bool composeCRLF=false) const noexcept |
| Convert text to Unicode-NFC normal form. | |
| std::u32string | toNFKD (std::u32string_view text) const noexcept |
| Convert text to Unicode-NFKD normal form. | |
| std::u32string | toNFKC (std::u32string_view text, bool composeCRLF=false) const noexcept |
| Convert text to Unicode-NFKC normal form. | |
| bool | checkGraphemeBreak (char32_t codeUnit, GraphemeBreakState &state) const noexcept |
| Check if for a graphemeBreak before the character. | |
| BidiClass | getBidiClass (char32_t codePoint) const noexcept |
| Get the bidirectional class for a code-point. | |
Unicode Data used for characterizing unicode code-points.
| tt::UnicodeData::UnicodeData | ( | nonstd::span< std::byte const > | bytes | ) |
Load binary unicode data.
The bytes passed into this constructor will need to remain available.
| tt::UnicodeData::UnicodeData | ( | std::unique_ptr< ResourceView > | view | ) |
Load binary unicode data from a resource.
|
noexcept |
Check if for a graphemeBreak before the character.
Code-units must be tested in order, starting at the beginning of the text.
Do not pass code-units above 0x1f'ffff nor the code-unit 0x00'ffff. Code units between 0x11'0000 and 0x1f'ffff will be treated as GraphemeUnitType::Other.
| codeUnit | Current code-unit to test. |
| state | Current state of the grapheme-break algorithm. |
|
noexcept |
Get the bidirectional class for a code-point.
Do not pass code-units above 0x1f'ffff nor the code-unit 0x00'ffff. Code units between 0x11'0000 and 0x1f'ffff will be treated as BidiClass::Unknown.
|
noexcept |
Convert text to Unicode-NFC normal form.
Certain ligatures, which are seen as separate graphemes by the user may be decomposed when using the decomposeLigatures flag.
Do not pass code-units above 0x1f'ffff nor the code-unit 0x00'ffff. Code units between 0x11'0000 and 0x1f'ffff will pass through.
| text | to normalize, in-place. |
| decomposeLigatures | 'canonical'-ligatures are decomposed. |
| composeCRLF | Compose CR-LF combinations to LF. |
|
noexcept |
Convert text to Unicode-NFD normal form.
Certain ligatures, which are seen as separate graphemes by the user may be decomposed when using the decomposeLigatures flag.
Do not pass code-units above 0x1f'ffff nor the code-unit 0x00'ffff. Code units between 0x11'0000 and 0x1f'ffff will pass through.
| text | to normalize, in-place. |
| decomposeLigatures | 'canonical'-ligatures are decomposed. |
|
noexcept |
Convert text to Unicode-NFKC normal form.
Do not pass code-units above 0x1f'ffff nor the code-unit 0x00'ffff. Code units between 0x11'0000 and 0x1f'ffff will pass through.
| text | to normalize, in-place. |
| composeCRLF | Compose CR-LF combinations to LF. |
|
noexcept |
Convert text to Unicode-NFKD normal form.
Do not pass code-units above 0x1f'ffff nor the code-unit 0x00'ffff. Code units between 0x11'0000 and 0x1f'ffff will pass through.
| text | to normalize, in-place. |