Do not use FT_LOAD_TARGET_LCD when full hinting is requested

In FreeType 2.8.0 FT_LOAD_TARGET_LCD is now a variant of
FT_LOAD_TARGET_LIGHT instead of of FT_LOAD_TARGET_NORMAL. This means
requesting it will get us light hinting.

See https://sourceforge.net/projects/freetype/files/freetype2/2.8

We should just avoid using it all together since we request the LCD
mode separately anyway with FT_RENDER_MODE later.

Change-Id: I9ea2e39a6e9ba25ba11604a194e552fe4240a127
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
Allan Sandfeld Jensen 2017-05-16 14:59:28 +02:00
parent ad8b4ba014
commit 2a0d96daa8

View File

@ -967,15 +967,10 @@ int QFontEngineFT::loadFlags(QGlyphSet *set, GlyphFormat format, int flags,
if (format == Format_Mono) {
load_target = FT_LOAD_TARGET_MONO;
} else if (format == Format_A32) {
if (subpixelType == Subpixel_RGB || subpixelType == Subpixel_BGR) {
if (default_hint_style == HintFull)
load_target = FT_LOAD_TARGET_LCD;
if (subpixelType == Subpixel_RGB || subpixelType == Subpixel_BGR)
hsubpixel = true;
} else if (subpixelType == Subpixel_VRGB || subpixelType == Subpixel_VBGR) {
if (default_hint_style == HintFull)
load_target = FT_LOAD_TARGET_LCD_V;
else if (subpixelType == Subpixel_VRGB || subpixelType == Subpixel_VBGR)
vfactor = 3;
}
} else if (format == Format_ARGB) {
#ifdef FT_LOAD_COLOR
load_flags |= FT_LOAD_COLOR;