Commit 31e726d939e7b79506d11164d259c9789e429761

Behdad Esfahbod 2013-09-20T07:20:53

Fix vertical size of emboldened glyphs. Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY' also.

diff --git a/ChangeLog b/ChangeLog
index bc8fb29..1f4c0ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-09-20  Behdad Esfahbod  <behdad@behdad.org>
+
+	Fix vertical size of emboldened glyphs.
+
+	Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709
+
+	* src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY'
+	also.
+
 2013-09-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
 	* include/freetype/ftoutln.h: Correct FT_Outline_Get_Orientation
diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c
index 241d37f..3098a60 100644
--- a/src/base/ftsynth.c
+++ b/src/base/ftsynth.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType synthesizing code for emboldening and slanting (body).      */
 /*                                                                         */
-/*  Copyright 2000-2006, 2010, 2012 by                                     */
+/*  Copyright 2000-2006, 2010, 2012, 2013 by                               */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -139,10 +139,11 @@
     if ( slot->advance.y )
       slot->advance.y += ystr;
 
-    slot->metrics.width       += xstr;
-    slot->metrics.height      += ystr;
-    slot->metrics.horiAdvance += xstr;
-    slot->metrics.vertAdvance += ystr;
+    slot->metrics.width        += xstr;
+    slot->metrics.height       += ystr;
+    slot->metrics.horiAdvance  += xstr;
+    slot->metrics.vertAdvance  += ystr;
+    slot->metrics.horiBearingY += ystr;
 
     /* XXX: 16-bit overflow case must be excluded before here */
     if ( slot->format == FT_GLYPH_FORMAT_BITMAP )