ui::FontName¶
Header: winui/render/Text.hpp.
A font family name kept inline, so whatever holds one owns its copy: a name taken from a std::string stays valid after the string is gone. A literal, a std::string_view or a std::string converts to it, and it is usable in constexpr tables (ui::glyphs::). Up to Capacity bytes of UTF-8; a longer name asserts and is cut.
Example:
ui::IconGlyph star_icon(const std::string& family) // a family name read from the settings
{
return ui::IconGlyph{0xE734, family}; // copies the name
}
Capacity¶
The longest name it holds, in bytes.
FontName¶
The empty name.
FontName¶
From a NUL-terminated name; null is the empty name.
FontName¶
From any run of characters.
FontName¶
From a string, copied.
c_str¶
The name, NUL-terminated.
view¶
The name.
operator std::string_view¶
The name as a string_view.
empty¶
True for the empty name.
size¶
The name's length in bytes.
data¶
The name's bytes, NUL-terminated.
str¶
The name as a std::string.