HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
hi::v1::character Struct Reference

#include <hikogui/text/character.hpp>

Public Types

using value_type = uint64_t

Public Member Functions

constexpr character (character const &) noexcept=default
constexpr character (character &&) noexcept=default
constexpr character & operator= (character const &) noexcept=default
constexpr character & operator= (character &&) noexcept=default
constexpr character (hi::grapheme g, character_attributes attributes) noexcept
constexpr character (char32_t code_point, character_attributes attributes) noexcept
constexpr character (char code_point, character_attributes attributes) noexcept
template<character_attribute... Attributes>
constexpr character (hi::grapheme g, Attributes const &...attributes) noexcept
template<character_attribute... Attributes>
constexpr character (char32_t code_point, Attributes const &...attributes) noexcept
template<character_attribute... Attributes>
constexpr character (char code_point, Attributes const &...attributes) noexcept
constexpr character (intrinsic_t, value_type value) noexcept
constexpr value_type & intrinsic () noexcept
constexpr value_type const & intrinsic () const noexcept
constexpr character & operator= (hi::grapheme grapheme) noexcept
constexpr character & operator= (char32_t code_point) noexcept
constexpr character & operator= (char code_point) noexcept
constexpr hi::grapheme grapheme () const noexcept
constexpr character & set_grapheme (hi::grapheme grapheme) noexcept
size_t size () const noexcept
char32_t operator[] (size_t i) const noexcept
constexpr character_attributes attributes () const noexcept
constexpr character & set_attributes (character_attributes attributes) noexcept

Data Fields

value_type _value
 [20: 0] 21-bit: grapheme.

Friends

constexpr friend bool operator== (character const &, character const &) noexcept=default
constexpr friend auto operator<=> (character const &, character const &) noexcept=default

Detailed Description

The standard HikoGUI character type.

This character type holds all the data necessary for displaying text, spell checking and text-to-speech.

The following information is needed:

  • Grapheme; Used to select glyphs from the font.
  • Language; Used to select rules for ligatures and glyph positioning from a font. Spelling check and text-to-speech.
  • region; Used for region specific spell check and selecting text-to-speech accents.
  • Script; Used to select ruled for ligatures and glyph positioning from a font. This is not available inside the character object but can be derived using unicode algorithms on a run of characters.
  • Phrasing; The semantic styling of a word in text.
  • Theme; The theme from which to select a text-style based on the language, script and phrasing.

Field Documentation

◆ _value

value_type hi::v1::character::_value

[20: 0] 21-bit: grapheme.

[59:21] 39-bit: attributes. [62:60] reserved '0' [63:63] Sign-bit reserved for eof.


The documentation for this struct was generated from the following file: