![]() |
Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Relatively efficient lookup of GlyphData from 16-bit Unicode codepoint. More...
#include <Font.h>
Public Member Functions | |
| GlyphMap ()=default | |
| ~GlyphMap ()=default | |
| MOVABLE (GlyphMap) | |
| NONCOPYABLE (GlyphMap) | |
| void | set (std::uint16_t codepoint, const GlyphData &glyph) |
| Store the GlyphData for a given Unicode codepoint. More... | |
| const GlyphData * | get (std::uint16_t codepoint) const |
Private Attributes | |
| std::unique_ptr< std::array< GlyphData, 256 > > | m_Data [256] |
Relatively efficient lookup of GlyphData from 16-bit Unicode codepoint.
This is stored as a sparse 2D array, exploiting the knowledge that a font typically only supports a small number of 256-codepoint blocks, so most elements of m_Data will be NULL. This implementation expand the store the GlyphData for a given Unicode codepoint (0 ≤ cp ≤ 0x10FFFF)
|
default |
|
default |
| const CFont::GlyphData * CFont::GlyphMap::get | ( | std::uint16_t | codepoint | ) | const |
| CFont::GlyphMap::MOVABLE | ( | GlyphMap | ) |
| CFont::GlyphMap::NONCOPYABLE | ( | GlyphMap | ) |
| void CFont::GlyphMap::set | ( | std::uint16_t | codepoint, |
| const GlyphData & | glyph | ||
| ) |
Store the GlyphData for a given Unicode codepoint.
| codepoint | The unicode codepoint (0 ≤ cp ≤ 0x10FFFF) |
| glyph | The glyphData data to store |
|
private |