forked from enlightenment/efl
Evas font: Disable run-time emboldment in some cases.
If OS/2 table is available and the font is demi-bold, don't do runtime emboldment.
This commit is contained in:
parent
dd4a5215d7
commit
2da15ced65
|
@ -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
|
2013-04-04 Yakov Goldberg
|
||||||
|
|
||||||
* Evas font: char position, returned by
|
* Evas font: char position, returned by
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -221,3 +221,4 @@ Fixes:
|
||||||
* Fix edje entry to respect filters and if input filtered out, don't clear selections
|
* Fix edje entry to respect filters and if input filtered out, don't clear selections
|
||||||
* Fix evas buffer engine allocation with non alpha output
|
* Fix evas buffer engine allocation with non alpha output
|
||||||
* Evas font: click on left/right half of char does matter now.
|
* 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.
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
#include "evas_font_private.h" /* for Frame-Queuing support */
|
#include "evas_font_private.h" /* for Frame-Queuing support */
|
||||||
#include "evas_font_ot.h"
|
#include "evas_font_ot.h"
|
||||||
|
#include <freetype/tttables.h> /* Freetype2 OS/2 font table. */
|
||||||
|
|
||||||
#ifdef EVAS_CSERVE2
|
#ifdef EVAS_CSERVE2
|
||||||
# include "../cserve2/evas_cs2_private.h"
|
# 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) &&
|
if ((fi->wanted_rend & FONT_REND_WEIGHT) &&
|
||||||
!(fi->src->ft.face->style_flags & FT_STYLE_FLAG_BOLD))
|
!(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;
|
return fi;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue