Commit 7ffb9dc6c7e053c25b986c1fa3d473945946c59d

henry 2001-09-20T00:22:39

Removed redundant code. Added comments for Advancs()

diff --git a/include/FTFont.h b/include/FTFont.h
index cc13bfa..70650c2 100755
--- a/include/FTFont.h
+++ b/include/FTFont.h
@@ -76,34 +76,35 @@ class	FTFont
 		virtual bool CharMap( FT_Encoding encoding );
 		
 		/**
-		 * Gets the global ascender height for the face in pixels.
+		 * Gets the global ascender height for the face.
 		 *
 		 * @return	Ascender height
 		 */
 		virtual int	Ascender() const;
 		
 		/**
-		 * Gets the global descender height for the face in pixels.
+		 * Gets the global descender height for the face.
 		 *
 		 * @return	Descender height
 		 */
 		virtual int	Descender() const;
 		
+		/**
+		 * Gets the advance width for a string.
+		 *
+		 * param string	a wchar_t string
+		 * @return		advance width
+		 */
 		float Advance( const wchar_t* string);
-		float Advance( const char* string);
-		
-		
+
 		/**
-		 * Gets the bounding box dimensions for a string.
-		 * 
-		 * @param	XXXXXXX
-		 * @param	XXXXXXX
-		 * @param	XXXXXXX
-		 * @param	XXXXXXX
-		 * @param	XXXXXXX
+		 * Gets the advance width for a string.
+		 *
+		 * param string	a char string
+		 * @return		advance width
 		 */
-//		virtual void BBox( const char* string, int& llx, int& lly, int& urx, int& ury ) const;
-		
+		float Advance( const char* string);
+
 		/**
 		 * Renders a string of characters
 		 * 
@@ -114,7 +115,7 @@ class	FTFont
 		/**
 		 * Renders a string of characters
 		 * 
-		 * @param string	'C' style string to be output.	 
+		 * @param string	wchar_t string to be output.	 
 		 */
 		virtual void render( const wchar_t* string );
 		
@@ -125,7 +126,7 @@ class	FTFont
 		 * @return	The current error code.
 		 */
 		virtual FT_Error Error() const { return err;}
-//		virtual const char* ErrorString();
+
 
 	protected:
 		/**
diff --git a/src/FTFont.cpp b/src/FTFont.cpp
index 7c980e7..fb93213 100755
--- a/src/FTFont.cpp
+++ b/src/FTFont.cpp
@@ -112,14 +112,6 @@ float FTFont::Advance( const char* string)
 }
 
 
-//void FTFont::BBox( const char* text, int& llx, int& lly, int& urx, int& ury ) const
-//{
-//Insert your own code here.
-
-//End of user code.         
-//}
-
-
 void FTFont::render( const char* string )
 {
 	const unsigned char* c = (unsigned char*)string; // This is ugly, what is the c++ way?
@@ -154,17 +146,3 @@ void FTFont::render( const wchar_t* string )
 		++c;
 	}
 }
-
-
-//const char* FTFont::ErrorString()
-// {
-//         static char ukn[1024];
-// 
-//         for (uint32 i = 0; ft_errors[i].err_code != 0 || ft_errors[i].err_msg != 0; i++)
-//         {
-//                 if (ft_errors[i].err_code == fte)
-//                         return ft_errors[i].err_msg;
-//         }
-//         smprintf (ukn, 1024, "Unknown freetype2 error, errcode: 0x%x", fte);
-//         return ukn;
-// }