![]() |
VR-Forces Developer's Guide
|
The character encoding map, maps the character code to a glyph index. Note there are two glyph indexes - the first is the container index, which is used in DtFont for vector access of a DtGlyph. This is stored against the character code in CharacterCodeToContainerIndexMap. The second is also the vector container index but this is keyed off the glyph index of the glyph inside the font, and stored in GlyphIndexToContainerIndexMap.
Public Member Functions | |
| DtCharacterEncodingMap (DtFreeTypeFace *face) | |
| ~DtCharacterEncodingMap () | |
| unsigned int | encoding () const |
| bool | setEncoding (unsigned int encoding) |
| unsigned int | indexInFont (unsigned int characterCode) const |
| void | setGlyphIndex (const unsigned int characterCode, const size_t containerIndex, unsigned int glyphIndex) |
| size_t | containerIndexOfGlyph (const unsigned int characterCode) const |
| size_t | containerIndexFromIndexOfGlyph (const unsigned int glyphIndex) const |
Protected Types | |
| using | CharacterCodeToContainerIndexMap = std::unordered_map< unsigned int, size_t > |
| using | GlyphIndexToContainerIndexMap = std::unordered_map< unsigned int, size_t > |
Protected Attributes | |
| CharacterCodeToContainerIndexMap | myGlyphMap |
| GlyphIndexToContainerIndexMap | myIndexMap |
| DtFreeTypeFace * | myFace |
| unsigned int | myEncoding |
| unsigned int | myIndexCache [TheCacheSize] |
Static Protected Attributes | |
| static const unsigned int | TheCacheSize = 128 |
|
protected |
|
protected |
| makVrv::DtCharacterEncodingMap::DtCharacterEncodingMap | ( | DtFreeTypeFace * | face | ) |
| makVrv::DtCharacterEncodingMap::~DtCharacterEncodingMap | ( | ) |
| size_t makVrv::DtCharacterEncodingMap::containerIndexOfGlyph | ( | const unsigned int | characterCode | ) | const |
Get container Glyph index used in DtFont.
| size_t makVrv::DtCharacterEncodingMap::containerIndexFromIndexOfGlyph | ( | const unsigned int | glyphIndex | ) | const |
Get container Glyph index used in DtFont.
Get index in font.
| void makVrv::DtCharacterEncodingMap::setGlyphIndex | ( | const unsigned int | characterCode, |
| const size_t | containerIndex, | ||
| unsigned int | glyphIndex | ||
| ) |
Add a character index.
|
protected |
|
protected |
|
protected |
|
protected |