Renamed functions for clarity
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
diff --git a/include/FTCharmap.h b/include/FTCharmap.h
index 69bb047..30a07c1 100644
--- a/include/FTCharmap.h
+++ b/include/FTCharmap.h
@@ -78,7 +78,16 @@ class FTGL_EXPORT FTCharmap
* @return The FTGlyphContainer index for the character or zero
* if it wasn't found
*/
- unsigned int CharIndex( const unsigned int characterCode);
+ signed int GlyphListIndex( const unsigned int characterCode);
+
+ /**
+ * Get the font glyph index of the input character.
+ *
+ * @param characterCode The character code of the requested glyph in
+ * the current encoding eg apple roman.
+ * @return The glyph index for the character.
+ */
+ signed int FontIndex( const unsigned int characterCode);
/**
* Set the FTGlyphContainer index of the character code.
@@ -91,15 +100,6 @@ class FTGL_EXPORT FTCharmap
void InsertIndex( const unsigned int characterCode, const unsigned int containerIndex);
/**
- * Get the font glyph index of the input character.
- *
- * @param characterCode The character code of the requested glyph in
- * the current encoding eg apple roman.
- * @return The glyph index for the character.
- */
- unsigned int GlyphIndex( const unsigned int characterCode);
-
- /**
* Queries for errors.
*
* @return The current error code. Zero means no error.
diff --git a/src/FTCharmap.cpp b/src/FTCharmap.cpp
index 31f6aa3..07ffac6 100644
--- a/src/FTCharmap.cpp
+++ b/src/FTCharmap.cpp
@@ -44,20 +44,19 @@ bool FTCharmap::CharMap( FT_Encoding encoding)
}
-unsigned int FTCharmap::CharIndex( unsigned int characterCode )
+signed int FTCharmap::GlyphListIndex( unsigned int characterCode )
{
return charMap.find( characterCode);
}
-void FTCharmap::InsertIndex( const unsigned int characterCode, const unsigned int containerIndex)
+signed int FTCharmap::FontIndex( unsigned int characterCode )
{
- charMap.insert( characterCode, containerIndex);
+ return FT_Get_Char_Index( ftFace, characterCode);
}
-unsigned int FTCharmap::GlyphIndex( const unsigned int characterCode)
+void FTCharmap::InsertIndex( const unsigned int characterCode, const unsigned int containerIndex)
{
- unsigned int glyphIndex = FT_Get_Char_Index( ftFace, characterCode);
- return glyphIndex;
+ charMap.insert( characterCode, containerIndex);
}