Commit 0bc4a552c2c3859bd780bc46dbfe3647c70998f6

sammy 2008-05-21T16:36:34

* Fix a bug in the FTFont::BBox calculation: the first glyph bbox was not relative to the position argument.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/FTFont/FTFont.cpp b/src/FTFont/FTFont.cpp
index 8f21feb..8ba2147 100644
--- a/src/FTFont/FTFont.cpp
+++ b/src/FTFont/FTFont.cpp
@@ -372,6 +372,8 @@ inline FTBBox FTFontImpl::BBoxI(const T* string, const int len,
         if(CheckGlyph(string[0]))
         {
             totalBBox = glyphList->BBox(string[0]);
+            totalBBox += position;
+
             position += glyphList->Advance(string[0], string[1]);
         }