#include <hikogui/font/font_char_map.hpp>
|
|
constexpr | font_char_map (font_char_map const &) noexcept=default |
| |
|
constexpr | font_char_map (font_char_map &&) noexcept=default |
| |
|
constexpr font_char_map & | operator= (font_char_map const &) noexcept=default |
| |
|
constexpr font_char_map & | operator= (font_char_map &&) noexcept=default |
| |
|
constexpr bool | empty () const noexcept |
| |
| constexpr void | reserve (size_t n) |
| | Reserve space for a set of ranges to be added.
|
| |
| constexpr size_t | count () const noexcept |
| | Get the number of code-points supported by the char-map.
|
| |
| constexpr size_t | update_mask (std::bitset< 0x11 '0000 > &mask) const noexcept |
| | Update a code-point mask.
|
| |
| constexpr void | add (char32_t start_code_point, char32_t end_code_point, uint16_t start_glyph) noexcept |
| | Add a range of code points.
|
| |
| void | prepare () noexcept |
| | Prepare the map for searching.
|
| |
| glyph_id | find (char32_t code_point) const noexcept |
| | Find a glyph for a code_point.
|
| |
Character map of a font.
This type serves the check if a code-point is supported by a font (even when the font is unloaded), and to retrieve the glyph mapped to the code-point.
◆ add()
| constexpr void hi::v1::font_char_map::add |
( |
char32_t | start_code_point, |
|
|
char32_t | end_code_point, |
|
|
uint16_t | start_glyph ) |
|
inlineconstexprnoexcept |
Add a range of code points.
- Parameters
-
| start_code_point | The starting code-point of the range. |
| end_code_point | The ending code-point of the range (inclusive). |
| start_glyph | The starting glyph of the range. |
◆ count()
| constexpr size_t hi::v1::font_char_map::count |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Get the number of code-points supported by the char-map.
◆ find()
| glyph_id hi::v1::font_char_map::find |
( |
char32_t | code_point | ) |
const |
|
inlinenoexcept |
Find a glyph for a code_point.
- Parameters
-
| code_point | The code-point to find in the character map. |
- Returns
- The corrosponding glyph found representing the code-point, or an empty glyph if not found.
◆ prepare()
| void hi::v1::font_char_map::prepare |
( |
| ) |
|
|
inlinenoexcept |
Prepare the map for searching.
- Precondition
- All ranged of code-point must have been added with
add().
- Postcondition
- The character map can be searched using
find().
◆ reserve()
| constexpr void hi::v1::font_char_map::reserve |
( |
size_t | n | ) |
|
|
inlineconstexpr |
Reserve space for a set of ranges to be added.
- Parameters
-
| n | The number of ranges to be added. |
◆ update_mask()
| constexpr size_t hi::v1::font_char_map::update_mask |
( |
std::bitset< 0x11 '0000 > & | mask | ) |
const |
|
inlineconstexprnoexcept |
Update a code-point mask.
- Parameters
-
| mask | The mask to be updated. |
- Returns
- Number of code-point that where added and where not in the mask before.
The documentation for this class was generated from the following file: