Better variable name
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
diff --git a/include/FTGLExtrdFont.h b/include/FTGLExtrdFont.h
index d01ab3f..dc784bb 100644
--- a/include/FTGLExtrdFont.h
+++ b/include/FTGLExtrdFont.h
@@ -15,40 +15,39 @@ class FTGlyph;
*/
class FTGL_EXPORT FTGLExtrdFont : public FTFont
{
- public:
+ public:
/**
* Open and read a font file. Sets Error flag.
*
* @param fontname font file name.
*/
- FTGLExtrdFont( const char* fontname);
-
+ FTGLExtrdFont( const char* fontname);
+
/**
* Open and read a font from a buffer in memory. Sets Error flag.
*
* @param pBufferBytes the in-memory buffer
* @param bufferSizeInBytes the length of the buffer in bytes
*/
- FTGLExtrdFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes);
-
- /**
- * Destructor
- */
- ~FTGLExtrdFont();
-
- void Depth( float d) { depth = d;}
+ FTGLExtrdFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes);
+
+ /**
+ * Destructor
+ */
+ ~FTGLExtrdFont();
- private:
- /**
- * Construct a FTPolyGlyph.
- *
- * @param g The glyph index NOT the char code.
- * @return An FTExtrdGlyph or <code>null</code> on failure.
- */
- inline virtual FTGlyph* MakeGlyph( unsigned int g);
+ void Depth( float d) { depth = d;}
- float depth;
+ private:
+ /**
+ * Construct a FTPolyGlyph.
+ *
+ * @param glyphIndex The glyph index NOT the char code.
+ * @return An FTExtrdGlyph or <code>null</code> on failure.
+ */
+ inline virtual FTGlyph* MakeGlyph( unsigned int glyphIndex);
+ float depth;
};
diff --git a/include/FTGLTextureFont.h b/include/FTGLTextureFont.h
index ff42e3f..ef95226 100755
--- a/include/FTGLTextureFont.h
+++ b/include/FTGLTextureFont.h
@@ -64,10 +64,10 @@ class FTGL_EXPORT FTGLTextureFont : public FTFont
/**
* Construct a FTTextureGlyph.
*
- * @param g The glyph index NOT the char code.
+ * @param glyphIndex The glyph index NOT the char code.
* @return An FTTextureGlyph or <code>null</code> on failure.
*/
- inline virtual FTGlyph* MakeGlyph( unsigned int g);
+ inline virtual FTGlyph* MakeGlyph( unsigned int glyphIndex);
/**
* Get the size of a block of memory required to layout the glyphs
diff --git a/src/FTGLExtrdFont.cpp b/src/FTGLExtrdFont.cpp
index 2beed8e..c29f158 100644
--- a/src/FTGLExtrdFont.cpp
+++ b/src/FTGLExtrdFont.cpp
@@ -18,9 +18,9 @@ FTGLExtrdFont::~FTGLExtrdFont()
{}
-FTGlyph* FTGLExtrdFont::MakeGlyph( unsigned int g)
+FTGlyph* FTGLExtrdFont::MakeGlyph( unsigned int glyphIndex)
{
- FT_Glyph* ftGlyph = face.Glyph( g, FT_LOAD_NO_HINTING);
+ FT_Glyph* ftGlyph = face.Glyph( glyphIndex, FT_LOAD_NO_HINTING);
if( ftGlyph)
{
diff --git a/src/FTGLTextureFont.cpp b/src/FTGLTextureFont.cpp
index ec72a20..5f2233d 100755
--- a/src/FTGLTextureFont.cpp
+++ b/src/FTGLTextureFont.cpp
@@ -56,9 +56,9 @@ FTGLTextureFont::~FTGLTextureFont()
}
-FTGlyph* FTGLTextureFont::MakeGlyph( unsigned int g)
+FTGlyph* FTGLTextureFont::MakeGlyph( unsigned int glyphIndex)
{
- FT_Glyph* ftGlyph = face.Glyph( g, FT_LOAD_NO_HINTING);
+ FT_Glyph* ftGlyph = face.Glyph( glyphIndex, FT_LOAD_NO_HINTING);
if( ftGlyph)
{
@@ -87,7 +87,6 @@ FTGlyph* FTGLTextureFont::MakeGlyph( unsigned int g)
FTTextureGlyph* tempGlyph = new FTTextureGlyph( *ftGlyph, glTextureID[numTextures - 1],
xOffset, yOffset, textureWidth, textureHeight);
-
xOffset += static_cast<int>( tempGlyph->BBox().upperX - tempGlyph->BBox().lowerX + padding);
--remGlyphs;