Removed maekGlyphList function and changes for FTFace
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
diff --git a/include/FTFont.h b/include/FTFont.h
index 560d46e..de8ca59 100755
--- a/include/FTFont.h
+++ b/include/FTFont.h
@@ -4,8 +4,8 @@
#include <ft2build.h>
#include FT_FREETYPE_H
-#include "FTGL.h"
#include "FTFace.h"
+#include "FTGL.h"
class FTGlyphContainer;
class FTGlyph;
@@ -182,46 +182,21 @@ class FTGL_EXPORT FTFont
inline virtual FTGlyph* MakeGlyph( unsigned int g) = 0;
/**
- * Construct the internal glyph cache.
- *
- * This a list of glyphs processed for openGL Rendering NOT
- * freetype glyphs.
- *
- * @return <code>true</code> on success.
- */
- virtual bool MakeGlyphList();
-
- /**
* Current face object
*/
FTFace face;
/**
- * Number of faces in this font
- */
- unsigned int numFaces;
-
- /**
* Current size object
*/
FTSize charSize;
/**
- * An object that holds a list of glyphs
- */
- FTGlyphContainer* glyphList;
-
- /**
- * Current pen or cursor position;
- */
- FTPoint pen;
-
- /**
* Current error code. Zero means no error.
*/
FT_Error err;
- private:
+ private:
/**
* Get the advance width for a character.
* This function does an implicit conversion on it's arguments.
@@ -246,6 +221,15 @@ class FTGL_EXPORT FTFont
*/
inline void CheckGlyph( const unsigned int chr);
+ /**
+ * An object that holds a list of glyphs
+ */
+ FTGlyphContainer* glyphList;
+
+ /**
+ * Current pen or cursor position;
+ */
+ FTPoint pen;
};
diff --git a/src/FTFont.cpp b/src/FTFont.cpp
index ae2197e..59bedbb 100755
--- a/src/FTFont.cpp
+++ b/src/FTFont.cpp
@@ -5,32 +5,18 @@
FTFont::FTFont( const char* fontname)
-: numFaces(0),
+: face( fontname),
glyphList(0)
{
- if( face.Open( fontname))
- {
- err = 0;
- }
- else
- {
- err = face.Error();
- }
+ err = face.Error();
}
FTFont::FTFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
-: numFaces(0),
+: face( pBufferBytes, bufferSizeInBytes),
glyphList(0)
{
- if( face.Open( pBufferBytes, bufferSizeInBytes ))
- {
- err = 0;
- }
- else
- {
- err = face.Error();
- }
+ err = face.Error();
}
@@ -70,8 +56,7 @@ bool FTFont::FaceSize( const unsigned int size, const unsigned int res )
}
glyphList = new FTGlyphContainer( &face);
-
- return MakeGlyphList();
+ return true;
}
@@ -81,12 +66,6 @@ unsigned int FTFont::FaceSize() const
}
-bool FTFont::MakeGlyphList()
-{
- return true;
-}
-
-
bool FTFont::CharMap( FT_Encoding encoding)
{
bool result = face.CharMap( encoding);