Add tracing messages for advance values. * src/base/ftobjs.c (FT_Load_Glyph), src/truetype/ttgload.c (TT_Get_HMetrics, TT_Get_VMetrics): Do it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
diff --git a/ChangeLog b/ChangeLog
index 4ee05ec..4efedbe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-11-15 Werner Lemberg <wl@gnu.org>
+
+ Add tracing messages for advance values.
+
+ * src/base/ftobjs.c (FT_Load_Glyph), src/truetype/ttgload.c
+ (TT_Get_HMetrics, TT_Get_VMetrics): Do it.
+
2009-11-08 Werner Lemberg <wl@gnu.org>
Fix compiler warning.
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 6fb2a8d..c74976a 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -744,6 +744,12 @@
}
}
+ FT_TRACE5(( " x advance: %d\n" , slot->advance.x ));
+ FT_TRACE5(( " y advance: %d\n" , slot->advance.y ));
+
+ FT_TRACE5(( " linear x advance: %d\n" , slot->linearHoriAdvance ));
+ FT_TRACE5(( " linear y advance: %d\n" , slot->linearVertAdvance ));
+
/* do we need to render the image now? */
if ( !error &&
slot->format != FT_GLYPH_FORMAT_BITMAP &&
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index aa3f040..1a32ec3 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -80,6 +80,9 @@
if ( check && face->postscript.isFixedPitch )
*aw = face->horizontal.advance_Width_Max;
+
+ FT_TRACE5(( " advance width (font units): %d\n", *aw ));
+ FT_TRACE5(( " left side bearing (font units): %d\n", *lsb ));
}
@@ -131,6 +134,8 @@
#endif
+ FT_TRACE5(( " advance height (font units): %d\n", *ah ));
+ FT_TRACE5(( " top side bearing (font units): %d\n", *tsb ));
}