|
HikoGUI
A low latency retained GUI
|
#include <hikogui/unicode/unicode_mask.hpp>
Public Member Functions | |
| constexpr | unicode_mask (unicode_mask const &) noexcept=default |
| constexpr | unicode_mask (unicode_mask &&) noexcept=default |
| constexpr unicode_mask & | operator= (unicode_mask const &) noexcept=default |
| constexpr unicode_mask & | operator= (unicode_mask &&) noexcept=default |
| constexpr std::size_t | size () const noexcept |
| bool | contains (char32_t c) const noexcept |
| Check if the given code point is covered by this mask. | |
| bool | contains_composed (grapheme g) const noexcept |
| Check if the full grapheme normalized to NFC is covered by this mask. | |
| bool | contains_decomposed (grapheme g) const noexcept |
| Check if the full grapheme normalized to NFD is covered by this mask. | |
| bool | contains (grapheme g) const noexcept |
| Check if the full grapheme is covered by this mask. | |
| bool | contains (unicode_mask const &other) const noexcept |
| Check if all the code-points in other are covered by this mask. | |
| void | add (char32_t first, char32_t last) noexcept |
| Add a range of unicode code points to this mask. | |
| unicode_mask & | operator|= (unicode_mask const &rhs) noexcept |
| Combine two masks. | |
| void | optimize () noexcept |
| Optimize storage. | |
| void | shrink_to_fit () noexcept |
| bool | holds_invariant () const noexcept |
| Check to see if the mask is still valid. | |
Friends | |
| unicode_mask | operator| (unicode_mask const &lhs, unicode_mask const &rhs) noexcept |
| Combine two masks. | |
A mask of unicode code-points.
This mask is used to determine which unicode code points are supported by a font. We need a fine grained mask so that we can find fallback glyphs for all unicode code points that are supported by the fonts.
At startup all the fonts are parsed and the unicode_mask is assembled, after this the font is unmapped from memory, but the unicode mask stays behind. Therefor the unicode mask should not use a lot of memory and be very fast to assemble.
Add a range of unicode code points to this mask.
| first | The first code-point to add. |
| last | One beyond the last code-point to add. |
Check if the given code point is covered by this mask.
Check if the full grapheme is covered by this mask.
|
noexcept |
Check if all the code-points in other are covered by this mask.
Check if the full grapheme normalized to NFC is covered by this mask.
Check if the full grapheme normalized to NFD is covered by this mask.
|
noexcept |
Check to see if the mask is still valid.
|
inlinenoexcept |
Combine two masks.
|
noexcept |
Optimize storage.
|
friend |
Combine two masks.