Commit c060dacd6d744e59835becc9cd7e2c9b21f1c010

henry 2002-11-27T07:39:45

Changes for FTPoint & FTBBox

diff --git a/include/FTFont.h b/include/FTFont.h
index 8867e6c..285d71f 100755
--- a/include/FTFont.h
+++ b/include/FTFont.h
@@ -243,7 +243,7 @@ class FTGL_EXPORT FTFont
         /**
          * Current pen or cursor position;
          */
-        FT_Vector pen;
+        FTPoint pen;
         
         /**
          * Current error code. Zero means no error.
@@ -269,6 +269,8 @@ class FTGL_EXPORT FTFont
          * @param nextChr   next character
          */
         inline void doRender( const unsigned int chr, const unsigned int nextChr);
+        
+
 
 };
 
diff --git a/src/FTFont.cpp b/src/FTFont.cpp
index 7ff67c9..9f53253 100755
--- a/src/FTFont.cpp
+++ b/src/FTFont.cpp
@@ -1,7 +1,7 @@
 #include    "FTFace.h"
 #include    "FTFont.h"
 #include    "FTGlyphContainer.h"
-#include    "FTGlyph.h" // for FTBbox
+#include    "FTBBox.h"
 
 
 FTFont::FTFont()
@@ -153,11 +153,11 @@ void FTFont::BBox( const char* string,
         bbox = glyphList->BBox( *c);
         
         // Lower extent
-        lly = lly < bbox.y1 ? lly: bbox.y1;
+        lly = lly < bbox.lowerY ? lly: bbox.lowerY;
         // Upper extent
-        ury = ury > bbox.y2 ? ury: bbox.y2;
+        ury = ury > bbox.upperY ? ury: bbox.upperY;
         // Depth
-        urz = urz < bbox.z2 ? urz: bbox.z2;
+        urz = urz < bbox.upperZ ? urz: bbox.upperZ;
 
         // Width
         urx += glyphList->Advance( *c, *(c + 1));
@@ -165,9 +165,9 @@ void FTFont::BBox( const char* string,
     }
     
     //Final adjustments
-    llx = glyphList->BBox( *string).x1;
+    llx = glyphList->BBox( *string).lowerX;
     urx -= glyphList->Advance( *(c - 1), 0);
-    urx += bbox.x2;
+    urx += bbox.upperX;
 
 }
 
@@ -189,11 +189,11 @@ void FTFont::BBox( const wchar_t* string,
         bbox = glyphList->BBox( *c);
         
         // Lower extent
-        lly = lly < bbox.y1 ? lly: bbox.y1;
+        lly = lly < bbox.lowerY ? lly: bbox.lowerY;
         // Upper extent
-        ury = ury > bbox.y2 ? ury: bbox.y2;
+        ury = ury > bbox.upperY ? ury: bbox.upperY;
         // Depth
-        urz = urz < bbox.z2 ? urz: bbox.z2;
+        urz = urz < bbox.upperZ ? urz: bbox.upperZ;
 
         // Width
         urx += glyphList->Advance( *c, *(c + 1));
@@ -201,9 +201,9 @@ void FTFont::BBox( const wchar_t* string,
     }
     
     //Final adjustments
-    llx = glyphList->BBox( *string).x1;
+    llx = glyphList->BBox( *string).lowerX;
     urx -= glyphList->Advance( *(c - 1), 0);
-    urx += bbox.x2;
+    urx += bbox.upperX;
 
 }
 
@@ -284,7 +284,7 @@ void FTFont::doRender( const unsigned int chr, const unsigned int nextChr)
         glyphList->Add( MakeGlyph( g), g);
     }
 
-    FT_Vector kernAdvance = glyphList->render( chr, nextChr, pen);
+    FTPoint kernAdvance = glyphList->render( chr, nextChr, pen);
     
     pen.x += kernAdvance.x;
     pen.y += kernAdvance.y;