Commit 74ddddc2c7dc3cde0480430bb6ec910a5120503a

henry 2001-08-05T21:41:09

Added FT_Error member. Minor tidy ups and fixed automatic variable warning in render()

diff --git a/include/FTGlyphContainer.h b/include/FTGlyphContainer.h
index 8850dbd..8185447 100755
--- a/include/FTGlyphContainer.h
+++ b/include/FTGlyphContainer.h
@@ -28,17 +28,21 @@ class	FTGlyphContainer
 		
 	private:
 		// methods
-//		bool	MakeGlyphList( FT_Face* face);
 		
 		// attributes
-//		FONTTYPE fontType;
+		FT_Error err;
 		bool preCache;
 		int numGlyphs;
 		FTGlyph* tempGlyph;
 		FT_Face* face;
 		
-//		typedef pair<int, FTGlyph*> CHARREF;
+		FT_Vector kernAdvance;
+		float advance;
+
+		
+//		typedef pair<int, FTGlyph*> CHARREF; // glyphIndex, glyph
 //		vector<CHARREF> glyphs;
+//		map< int, FTGlyph*> CHARREF; // charCode, glyph
 		vector<FTGlyph*> glyphs;
 		
 };
diff --git a/src/FTGlyphContainer.cpp b/src/FTGlyphContainer.cpp
index e7e199b..d92e1b6 100755
--- a/src/FTGlyphContainer.cpp
+++ b/src/FTGlyphContainer.cpp
@@ -31,12 +31,8 @@ bool FTGlyphContainer::Add( FTGlyph* tempGlyph)
 }
 
 
-// OPSignature: bool FTGlyphContainer:render( int:index ) 
 FT_Vector& FTGlyphContainer::render( int index, int next, FT_Vector pen)
 {
-	FT_Vector kernAdvance;
-	float advance;
-	
 	kernAdvance.x = 0; kernAdvance.y = 0;
 	
 	if( index > glyphs.size())
@@ -44,12 +40,12 @@ FT_Vector& FTGlyphContainer::render( int index, int next, FT_Vector pen)
 	
 	if( 0 < next <=  glyphs.size())
 	{
-		FT_Error err = FT_Get_Kerning( *face, glyphs[index]->glyphIndex, glyphs[next]->glyphIndex, ft_kerning_default, &kernAdvance);
+		err = FT_Get_Kerning( *face, glyphs[index]->glyphIndex, glyphs[next]->glyphIndex, ft_kerning_default, &kernAdvance);
 	}
 	
 	advance = glyphs[index]->Render( pen);
 	
 	kernAdvance.x = advance + kernAdvance.x;
-//	kernAdvance.y = advance.y;
+//	kernAdvance.y = advance.y + kernAdvance.y;
 	return kernAdvance;
 }