diff options
author | Trond Kjernåsen <trond@trolltech.com> | 2009-09-22 10:37:34 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond@trolltech.com> | 2009-09-22 10:40:37 (GMT) |
commit | 66ae0f190f1f07ce7b2578b81f8d0c69328cf028 (patch) | |
tree | 36943b60f1cc5211aa356a897bab2f4679f510b1 /src/gui/text | |
parent | 717f6ee081fdfcb7d028e3e26d252f9537878899 (diff) | |
download | Qt-66ae0f190f1f07ce7b2578b81f8d0c69328cf028.zip Qt-66ae0f190f1f07ce7b2578b81f8d0c69328cf028.tar.gz Qt-66ae0f190f1f07ce7b2578b81f8d0c69328cf028.tar.bz2 |
Fixed text drawing in the GL2 engine after sub-pixel hinting was added.
1. The mono format was not handled at all.
2. We really, really wanted to use sub-pixel hinted glyphs even
when they were not available.
3. The glyphFormat type in the FT font engine wasn't updated to
reflect the correct system glyph type.
Reviewed-by: Kim
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qfontengine_ft.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index a4b2e7e..788417a 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -647,8 +647,14 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format) { defaultFormat = format; this->antialias = antialias; + if (!antialias) glyphFormat = QFontEngineGlyphCache::Raster_Mono; + else if (format == Format_A8) + glyphFormat = QFontEngineGlyphCache::Raster_A8; + else if (format == Format_A32) + glyphFormat = QFontEngineGlyphCache::Raster_RGBMask; + face_id = faceId; freetype = QFreetypeFace::getFace(face_id); if (!freetype) { |