Commit 634f23977b0899c4588718ebc6bee4b5e24d0b0c

henry 2002-06-22T23:33:44

Added accessors for point size

diff --git a/include/FTFont.h b/include/FTFont.h
index 5338dfa..c2daa0c 100755
--- a/include/FTFont.h
+++ b/include/FTFont.h
@@ -88,6 +88,13 @@ class FTGL_EXPORT FTFont
         bool FaceSize( const unsigned int size, const unsigned int res = 72);
         
         /**
+         * Get the the current face.
+         *
+         * @return face size
+         */
+        unsigned int FaceSize() const;
+        
+        /**
          * Set the extrusion distance for the font. Only availbale for
          * Extruded fonts
          *
@@ -95,7 +102,6 @@ class FTGL_EXPORT FTFont
          */
         virtual void Depth( float){}
 
-        
         /**
          * Set the character map for the face.
          *
diff --git a/include/FTSize.h b/include/FTSize.h
index 6019e8f..d3078db 100755
--- a/include/FTSize.h
+++ b/include/FTSize.h
@@ -42,6 +42,13 @@ class FTGL_EXPORT FTSize
         bool CharSize( FT_Face* face, unsigned int point_size, unsigned int x_resolution, unsigned int y_resolution );
         
         /**
+         * get the char size for the current face.
+         *
+         * @return The char size in points
+         */
+        unsigned int CharSize() const;
+        
+        /**
          * Gets the global ascender height for the face in pixels.
          *
          * @return  Ascender height
diff --git a/src/FTFont.cpp b/src/FTFont.cpp
index f795ef6..377a577 100755
--- a/src/FTFont.cpp
+++ b/src/FTFont.cpp
@@ -92,6 +92,12 @@ bool FTFont::FaceSize( const unsigned int size, const unsigned int res )
 }
 
 
+unsigned int FTFont::FaceSize() const
+{
+    return charSize.CharSize();
+}
+
+
 bool FTFont::MakeGlyphList()
 {
     for( unsigned int c = 0; c < numGlyphs; ++c)
diff --git a/src/FTSize.cpp b/src/FTSize.cpp
index 748251c..a9ad747 100755
--- a/src/FTSize.cpp
+++ b/src/FTSize.cpp
@@ -24,6 +24,12 @@ bool FTSize::CharSize( FT_Face* face, unsigned int point_size, unsigned int x_re
 }
 
 
+unsigned int FTSize::CharSize() const
+{
+    return size;
+}
+
+
 int FTSize::Ascender() const
 {
     return ftSize->metrics.ascender >> 6;