diff --git a/include/ftsynth.h b/include/ftsynth.h index ca7f2c7..4b13807 100644 --- a/include/ftsynth.h +++ b/include/ftsynth.h @@ -62,8 +62,10 @@ FT_BEGIN_HEADER /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */ /* */ /* For emboldened outlines the height, width, and advance metrics are */ - /* increased by the strength of the emboldening. You can also call */ - /* @FT_Outline_Get_CBox to get precise values. */ + /* increased by the strength of the emboldening. (An exception to this */ + /* are mono-width fonts, where the horizontal advance metrics are left */ + /* unchanged.) You can also call @FT_Outline_Get_CBox to get precise */ + /* values. */ FT_EXPORT( void ) FT_GlyphSlot_Embolden( FT_GlyphSlot slot ); diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c index cd68533..cab2bb0 100644 --- a/src/base/ftsynth.c +++ b/src/base/ftsynth.c @@ -150,7 +150,10 @@ slot->metrics.width += xstr; slot->metrics.height += ystr; - slot->metrics.horiAdvance += xstr; + /* for mono-width fonts (like Andale, Courier, etc.) we need */ + /* to keep the original advance width */ + if ( !FT_IS_FIXED_WIDTH( face ) ) + slot->metrics.horiAdvance += xstr; slot->metrics.vertAdvance += ystr; slot->metrics.horiBearingY += ystr;