14namespace utility::graphic
54 void parse(
const std::string &content);
62 [[nodiscard]] uint32_t
getCode(
const std::string &name)
const;
71 [[nodiscard]]
static std::string
toUtf8(uint32_t codePoint);
74 std::map<std::string, uint32_t>
The CodePoints class manages a mapping from glyph names to Unicode code points.
~CodePoints()=default
Default destructor.
void parse(const std::string &content)
Populates the mapping from a .codepoints formatted string.
std::map< std::string, uint32_t > _codes
Internal name-to-code mapping.
uint32_t getCode(const std::string &name) const
Retrieves the Unicode code point for a given glyph name.
static std::string toUtf8(uint32_t codePoint)
Converts a single Unicode code point to a UTF-8 encoded string.
CodePoints()=default
Constructs an empty CodePoints object.