diff --git a/ChangeLog b/ChangeLog index e6e743bc62..86a88dd65f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-04-04 Tom Hacohen + + * Evas font: If OS/2 table is available and the font is demi-bold, + don't do runtime emboldment. + 2013-04-04 Yakov Goldberg * Evas font: char position, returned by diff --git a/NEWS b/NEWS index 5cab2bc092..a1cda47c90 100644 --- a/NEWS +++ b/NEWS @@ -221,3 +221,4 @@ Fixes: * Fix edje entry to respect filters and if input filtered out, don't clear selections * Fix evas buffer engine allocation with non alpha output * Evas font: click on left/right half of char does matter now. + * Evas font: If OS/2 table is available and the font is demi-bold, don't do runtime emboldment. diff --git a/src/lib/evas/common/evas_font_load.c b/src/lib/evas/common/evas_font_load.c index b1a6efd622..9bdb10fe3a 100644 --- a/src/lib/evas/common/evas_font_load.c +++ b/src/lib/evas/common/evas_font_load.c @@ -15,6 +15,7 @@ #include "evas_font_private.h" /* for Frame-Queuing support */ #include "evas_font_ot.h" +#include /* Freetype2 OS/2 font table. */ #ifdef EVAS_CSERVE2 # include "../cserve2/evas_cs2_private.h" @@ -505,7 +506,13 @@ evas_common_font_int_load_complete(RGBA_Font_Int *fi) if ((fi->wanted_rend & FONT_REND_WEIGHT) && !(fi->src->ft.face->style_flags & FT_STYLE_FLAG_BOLD)) - fi->runtime_rend |= FONT_REND_WEIGHT; + { + TT_OS2 *tt_os2 = FT_Get_Sfnt_Table(fi->src->ft.face, ft_sfnt_os2); + if (!tt_os2 || (tt_os2->usWeightClass < 600)) + { + fi->runtime_rend |= FONT_REND_WEIGHT; + } + } return fi; }