Only set FT_LOAD_TARGET_LCD when we have specified it. Use FT_LOAD_TARGET_NORMAL when we havn't.

(FT_LOAD_TARGET_LIGHT might also be an option.)
This commit is contained in:
Fredrik Holmqvist
2012-05-23 20:30:27 +02:00
parent 021ccbd18f
commit d6e724d549
+5 -3
View File
@@ -620,9 +620,11 @@ FontEngine::GlyphIndexForGlyphCode(uint32 glyphCode) const
bool bool
FontEngine::PrepareGlyph(uint32 glyphIndex) FontEngine::PrepareGlyph(uint32 glyphIndex)
{ {
fLastError = FT_Load_Glyph(fFace, glyphIndex, FT_Int32 loadFlags = fHinting ? FT_LOAD_DEFAULT : FT_LOAD_NO_HINTING;
(fHinting ? (FT_LOAD_DEFAULT | FT_LOAD_TARGET_LCD) loadFlags |= fGlyphRendering == glyph_ren_subpix ?
: FT_LOAD_NO_HINTING)); FT_LOAD_TARGET_LCD : FT_LOAD_TARGET_NORMAL;
fLastError = FT_Load_Glyph(fFace, glyphIndex, loadFlags);
if (fLastError != 0) if (fLastError != 0)
return false; return false;