|
HikoGUI
A low latency retained GUI
|
#include <ttauri/text/unicode_description.hpp>
Public Member Functions | |
| constexpr | unicode_description (char32_t code_point, unicode_general_category general_category, unicode_grapheme_cluster_break grapheme_cluster_break, unicode_bidi_class bidi_class, unicode_bidi_bracket_type bidi_bracket_type, char32_t bidi_mirrored_glyph, bool decomposition_canonical, bool composition_canonical, uint8_t combining_class, uint8_t decomposition_length, uint32_t decomposition_index) noexcept |
| constexpr char32_t | code_point () const noexcept |
| The code point of the description. | |
| constexpr unicode_grapheme_cluster_break | grapheme_cluster_break () const noexcept |
| The grapheme cluster break of this code-point. | |
| constexpr unicode_general_category | general_category () const noexcept |
| The general category of this code-point. | |
| constexpr unicode_bidi_class | bidi_class () const noexcept |
| The bidi class of this code-point This function is used by the bidirectional algorithm to figure out if the code-point represents a character that is written left-to-right or right-to-left. | |
| constexpr unicode_bidi_bracket_type | bidi_bracket_type () const noexcept |
| Get the bidi bracket type. | |
| constexpr char32_t | bidi_mirrored_glyph () const noexcept |
| Get the mirrored glyph. | |
| constexpr bool | decomposition_canonical () const noexcept |
| This character has a canonical decomposition. | |
| constexpr bool | composition_canonical () const noexcept |
| This character has a canonical composition. | |
| constexpr uint8_t | combining_class () const noexcept |
| Get the combining class. | |
| constexpr size_t | decomposition_length () const noexcept |
| The number of code-points the decomposed grapheme has. | |
| constexpr size_t | decomposition_index () const noexcept |
| A multi-use value representing the decomposition of this code-point. | |
| constexpr char32_t | canonical_equivalent () const noexcept |
| Get the canonical equivalent of this code-point. | |
Friends | |
| template<typename It > | |
| constexpr It | unicode_description_find (It first, It last, char32_t code_point) noexcept |
| Find a code-point in a unicode_description table using a binary-search algorithm. | |
Description of a unicode code point.
This class holds information of a unicode code point.
The information is compressed to use bit-fields to reduce memory usage of the unicode database.
|
inlineconstexprnoexcept |
Get the bidi bracket type.
This function is used by the bidirectional algorithm for mirroring characters when needing to reverse the writing direction.
|
inlineconstexprnoexcept |
The bidi class of this code-point This function is used by the bidirectional algorithm to figure out if the code-point represents a character that is written left-to-right or right-to-left.
|
inlineconstexprnoexcept |
Get the mirrored glyph.
|
inlineconstexprnoexcept |
Get the canonical equivalent of this code-point.
The canonical equivalent is the code-point after NFC-normalization. This is equal to canonical decomposition to a single code-point.
|
inlineconstexprnoexcept |
The code point of the description.
|
inlineconstexprnoexcept |
Get the combining class.
The combing class describes how a code-point combines with other code-points. Specifically the value 0 means that the code-point is a starter character, and the numeric value of the combing class determines the order of the the code-points after a starter before trying to look up composition in the composition table.
|
inlineconstexprnoexcept |
This character has a canonical composition.
|
inlineconstexprnoexcept |
This character has a canonical decomposition.
|
inlineconstexprnoexcept |
A multi-use value representing the decomposition of this code-point.
To compress the data for decomposition:
|
inlineconstexprnoexcept |
The number of code-points the decomposed grapheme has.
| 0 | There is no decomposition |
| 1 | Decomposition is a single code-point, the decomposition_index() is the numeric value of the code point. |
| 2 | Decomposition is has two code-point. When composition_canonical is set the decomposition_index() points in the composition table. Otherwise the index points into the decomposition table. |
decomposition_index().
|
inlineconstexprnoexcept |
The general category of this code-point.
This function is used to determine what kind of code-point this, this allows you to determine if the code-point is a letter, number, punctuation, white-space, etc.
|
inlineconstexprnoexcept |
The grapheme cluster break of this code-point.
This function is used to determine where to break a string of code-points into grapheme clusters.
|
friend |
Find a code-point in a unicode_description table using a binary-search algorithm.
| first | The iterator pointing to the first element of a sorted container of unicode_description objects. |
| last | The iterator pointing to one beyond the last element of a sorted container of unicode_description objects. |
| code_point | The code point to look up. |