Removed DoAdvance function
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
diff --git a/include/FTFont.h b/include/FTFont.h
index de8ca59..c140323 100755
--- a/include/FTFont.h
+++ b/include/FTFont.h
@@ -198,16 +198,6 @@ class FTGL_EXPORT FTFont
private:
/**
- * Get the advance width for a character.
- * This function does an implicit conversion on it's arguments.
- *
- * @param chr current character
- * @param nextChr next character
- * @return advance width
- */
- inline float DoAdvance( const unsigned int chr, const unsigned int nextChr);
-
- /**
* Render a character
* This function does an implicit conversion on it's arguments.
*
diff --git a/src/FTFont.cpp b/src/FTFont.cpp
index 84072de..14540a3 100755
--- a/src/FTFont.cpp
+++ b/src/FTFont.cpp
@@ -164,7 +164,8 @@ float FTFont::Advance( const wchar_t* string)
while( *c)
{
- width += DoAdvance( *c, *(c + 1));
+ CheckGlyph( *c);
+ width += glyphList->Advance( *c, *(c + 1));
++c;
}
@@ -179,22 +180,15 @@ float FTFont::Advance( const char* string)
while( *c)
{
- width += DoAdvance( *c, *(c + 1));
+ CheckGlyph( *c);
+ width += glyphList->Advance( *c, *(c + 1));
++c;
}
-
+
return width;
}
-float FTFont::DoAdvance( const unsigned int chr, const unsigned int nextChr)
-{
- CheckGlyph( chr);
-
- return glyphList->Advance( chr, nextChr);
-}
-
-
void FTFont::Render( const char* string )
{
const unsigned char* c = (unsigned char*)string;