Removed FTCharmap member and associated methods
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
diff --git a/include/FTFace.h b/include/FTFace.h
index 4f91464..bb15768 100755
--- a/include/FTFace.h
+++ b/include/FTFace.h
@@ -10,8 +10,6 @@
#include "FTPoint.h"
#include "FTSize.h"
-class FTCharmap;
-
/**
* FTFace class provides an abstraction layer for the Freetype Face.
*
@@ -66,6 +64,8 @@ class FTGL_EXPORT FTFace
* Disposes of the face
*/
void Close();
+
+ FT_Face* Face() const { return ftFace;}
void* FontTable( unsigned int tableName) const;
@@ -85,27 +85,8 @@ class FTGL_EXPORT FTFace
unsigned int UnitsPerEM() const;
- /**
- * Sets the character map for the face.
- *
- * This doesn't guarantee that the size was set correctly. Clients
- * should check errors.
- *
- * @param encoding the Freetype encoding symbol. See above.
- * @return <code>true</code> if charmap was valid
- * and set correctly
- */
- bool CharMap( FT_Encoding encoding);
-
- /**
- * Get the glyph index of the input character.
- *
- * @param index The character code of the requested glyph in the
- * current encoding eg apple roman.
- * @return The glyph index for the character.
- */
- unsigned int CharIndex( unsigned int index ) const;
-
+// FTCharmap* CharMap() const { return charMap;}
+
/**
* Gets the kerning vector between two glyphs
*/
@@ -140,11 +121,6 @@ class FTGL_EXPORT FTFace
FTSize charSize;
/**
- * The Character Map object associated with this face
- */
- FTCharmap* charMap;
-
- /**
* Temporary variable to hold a glyph
*/
FT_Glyph ftGlyph;
diff --git a/src/FTFace.cpp b/src/FTFace.cpp
index 42f7d58..c106062 100755
--- a/src/FTFace.cpp
+++ b/src/FTFace.cpp
@@ -1,13 +1,10 @@
#include "FTFace.h"
#include "FTLibrary.h"
-#include "FTCharmap.h"
-
#include FT_TRUETYPE_TABLES_H
FTFace::FTFace( const char* filename)
-: charMap(0),
- numGlyphs(0),
+: numGlyphs(0),
err(0)
{
const FT_Long DEFAULT_FACE_INDEX = 0;
@@ -22,15 +19,13 @@ FTFace::FTFace( const char* filename)
}
else
{
- charMap = new FTCharmap( *ftFace);
numGlyphs = (*ftFace)->num_glyphs;
}
}
FTFace::FTFace( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
-: charMap(0),
- numGlyphs(0),
+: numGlyphs(0),
err(0)
{
const FT_Long DEFAULT_FACE_INDEX = 0;
@@ -45,7 +40,6 @@ FTFace::FTFace( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
}
else
{
- charMap = new FTCharmap( *ftFace);
numGlyphs = (*ftFace)->num_glyphs;
}
}
@@ -53,7 +47,6 @@ FTFace::FTFace( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
FTFace::~FTFace()
{
- delete charMap;
Close();
}
@@ -105,26 +98,12 @@ const FTSize& FTFace::Size( const unsigned int size, const unsigned int res)
}
-bool FTFace::CharMap( FT_Encoding encoding)
-{
- bool result = charMap->CharMap( encoding);
- err = charMap->Error();
- return result;
-}
-
-
unsigned int FTFace::UnitsPerEM() const
{
return (*ftFace)->units_per_EM;
}
-unsigned int FTFace::CharIndex( unsigned int index) const
-{
- return charMap->CharIndex( index);
-}
-
-
FTPoint FTFace::KernAdvance( unsigned int index1, unsigned int index2)
{
float x, y;
@@ -164,5 +143,3 @@ FT_Glyph* FTFace::Glyph( unsigned int index, FT_Int load_flags)
return &ftGlyph;
}
-
-