diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-05-06 09:58:56 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-05-06 13:04:43 (GMT) |
commit | 2043637a4e17252062fcb483e2e63ce0cb0920dd (patch) | |
tree | 6b6d8c90298f10bbfbf20dda6f81a1aba9819e9c /src/gui/text/qfontengine_ft.cpp | |
parent | 3cec5ff3f0aa8d3eca0dfb325e83a8a3a18cb305 (diff) | |
download | Qt-2043637a4e17252062fcb483e2e63ce0cb0920dd.zip Qt-2043637a4e17252062fcb483e2e63ce0cb0920dd.tar.gz Qt-2043637a4e17252062fcb483e2e63ce0cb0920dd.tar.bz2 |
Re-enabled antialiasing for large font sizes in OpenGL paint engine.
In 4.4 alphaMapForGlyph() would return valid images for any font size,
but this was changed in 4.5, forcing us to use the path fallback
instead. This lead to non-antialiased fonts when not using a
multisample-enabled GL format. This patch re-introduces the
alphaMapForGlyph() fallback in QFontEngine from 4.4 which uses the
raster paint engine to draw the glyph.
Task-number: 247083
Reviewed-by: Trond
Diffstat (limited to 'src/gui/text/qfontengine_ft.cpp')
-rw-r--r-- | src/gui/text/qfontengine_ft.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index cb0b436..de03a3c 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -1788,9 +1788,11 @@ QImage QFontEngineFT::alphaMapForGlyph(glyph_t g) GlyphFormat glyph_format = antialias ? Format_A8 : Format_Mono; - Glyph *glyph = loadGlyph(g, glyph_format); - if (!glyph) - return QImage(); + Glyph *glyph = defaultGlyphSet.outline_drawing ? 0 : loadGlyph(g, glyph_format); + if (!glyph) { + unlockFace(); + return QFontEngine::alphaMapForGlyph(g); + } const int pitch = antialias ? (glyph->width + 3) & ~3 : ((glyph->width + 31)/32) * 4; |