VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Attributes | Static Protected Attributes
makVrv::DtCharacterEncodingMap Class Reference

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
 
DtFreeTypeFacemyFace
 
unsigned int myEncoding
 
unsigned int myIndexCache [TheCacheSize]
 

Static Protected Attributes

static const unsigned int TheCacheSize = 128
 

Member Typedef Documentation

using makVrv::DtCharacterEncodingMap::CharacterCodeToContainerIndexMap = std::unordered_map<unsigned int, size_t>
protected
using makVrv::DtCharacterEncodingMap::GlyphIndexToContainerIndexMap = std::unordered_map<unsigned int, size_t>
protected

Constructor & Destructor Documentation

makVrv::DtCharacterEncodingMap::DtCharacterEncodingMap ( DtFreeTypeFace face)
makVrv::DtCharacterEncodingMap::~DtCharacterEncodingMap ( )

Member Function Documentation

unsigned int makVrv::DtCharacterEncodingMap::encoding ( ) const

Get the current encoding.

bool makVrv::DtCharacterEncodingMap::setEncoding ( unsigned int  encoding)

Set the encoding of the.

size_t makVrv::DtCharacterEncodingMap::containerIndexOfGlyph ( const unsigned int  characterCode) const

Get container Glyph index used in DtFont.

Returns
0 if the glyph is not found.
size_t makVrv::DtCharacterEncodingMap::containerIndexFromIndexOfGlyph ( const unsigned int  glyphIndex) const

Get container Glyph index used in DtFont.

Returns
0 if the glyph is not found.
unsigned int makVrv::DtCharacterEncodingMap::indexInFont ( unsigned int  characterCode) const

Get index in font.

Returns
0 if the character is not found.
void makVrv::DtCharacterEncodingMap::setGlyphIndex ( const unsigned int  characterCode,
const size_t  containerIndex,
unsigned int  glyphIndex 
)

Add a character index.

Member Data Documentation

CharacterCodeToContainerIndexMap makVrv::DtCharacterEncodingMap::myGlyphMap
protected
GlyphIndexToContainerIndexMap makVrv::DtCharacterEncodingMap::myIndexMap
protected
DtFreeTypeFace* makVrv::DtCharacterEncodingMap::myFace
protected
unsigned int makVrv::DtCharacterEncodingMap::myEncoding
protected
const unsigned int makVrv::DtCharacterEncodingMap::TheCacheSize = 128
staticprotected
unsigned int makVrv::DtCharacterEncodingMap::myIndexCache[TheCacheSize]
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)