VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCharacterEncodingMap.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
12 #include <unordered_map>
13 
14 namespace makVrv
15 {
16  class DtFreeTypeFace;
17 
28  {
29  public:
30  // CTOR
33 
35  unsigned int encoding() const;
36 
38  bool setEncoding(unsigned int encoding);
39 
43  size_t containerIndexOfGlyph(const unsigned int characterCode) const;
44  size_t containerIndexFromIndexOfGlyph( const unsigned int glyphIndex ) const;
46 
49  unsigned int indexInFont(unsigned int characterCode) const;
50 
52  void setGlyphIndex(const unsigned int characterCode, const size_t containerIndex, unsigned int glyphIndex );
53 
54  protected:
55 
56  using CharacterCodeToContainerIndexMap = std::unordered_map<unsigned int, size_t> ;
57  using GlyphIndexToContainerIndexMap = std::unordered_map<unsigned int, size_t>;
61 
62  unsigned int myEncoding;
63  static const unsigned int TheCacheSize = 128;
64  unsigned int myIndexCache[TheCacheSize];
65  };
66 }
A class which encapsulates a free type face object.
Definition: DtFreeTypeFace.h:23
GlyphIndexToContainerIndexMap myIndexMap
Definition: DtCharacterEncodingMap.h:59
unsigned int myEncoding
Definition: DtCharacterEncodingMap.h:62
CharacterCodeToContainerIndexMap myGlyphMap
Definition: DtCharacterEncodingMap.h:58
DtFreeTypeFace * myFace
Definition: DtCharacterEncodingMap.h:60
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
std::unordered_map< unsigned int, size_t > CharacterCodeToContainerIndexMap
Definition: DtCharacterEncodingMap.h:56
std::unordered_map< unsigned int, size_t > GlyphIndexToContainerIndexMap
Definition: DtCharacterEncodingMap.h:57
The character encoding map, maps the character code to a glyph index. Note there are two glyph indexe...
Definition: DtCharacterEncodingMap.h:27

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)