freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] Adjust y-bearing when emboldening


From: Behdad Esfahbod
Subject: [ft-devel] Adjust y-bearing when emboldening
Date: Thu, 19 Sep 2013 18:36:59 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

This patch is needed, otherwise y-bearing will be wrong and glyphs will be cut
off in applications that use the y-bearing.

diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c
index 241d37f..1d01247 100644
--- a/src/base/ftsynth.c
+++ b/src/base/ftsynth.c
@@ -143,6 +143,7 @@
     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 )

Context:

  https://bugzilla.gnome.org/show_bug.cgi?id=686709

Cheers,
-- 
behdad
http://behdad.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]