summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@nokia.com>2009-06-05 13:40:17 (GMT)
committerThomas Hartmann <Thomas.Hartmann@nokia.com>2009-06-05 13:46:27 (GMT)
commit407a77cb2660cf122b08a388216f3a2da8cfd1c3 (patch)
treeb5c609d9fe6ab2974d423212c6153198844e2ef8 /src/gui/text
parent65f6422401f7dfeb5f3a7fcc3791528b4cf2cee4 (diff)
downloadQt-407a77cb2660cf122b08a388216f3a2da8cfd1c3.zip
Qt-407a77cb2660cf122b08a388216f3a2da8cfd1c3.tar.gz
Qt-407a77cb2660cf122b08a388216f3a2da8cfd1c3.tar.bz2
Fixes anti-aliased text rendering on smartphones (Windows Mobile)
The check for cleartype in qt_win_read_cleartype_settings() was not correct for Windows Mobile For anti-aliased text rendering we also have to use another pixel format for the native image. Task-number: 249642 Reviewed-by: mauricek
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfontengine_win.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp
index 002e670..d172a81 100644
--- a/src/gui/text/qfontengine_win.cpp
+++ b/src/gui/text/qfontengine_win.cpp
@@ -1333,6 +1333,7 @@ bool QFontEngineWin::getSfntTableData(uint tag, uchar *buffer, uint *length) con
# define CLEARTYPE_QUALITY 5
#endif
+extern bool qt_cleartype_enabled;
QNativeImage *QFontEngineWin::drawGDIGlyph(HFONT font, glyph_t glyph, int margin,
const QTransform &t)
@@ -1408,7 +1409,11 @@ QNativeImage *QFontEngineWin::drawGDIGlyph(HFONT font, glyph_t glyph, int margin
QNativeImage *ni = new QNativeImage(iw + 2 * margin + 4,
ih + 2 * margin + 4,
- QNativeImage::systemFormat(), true);
+ QNativeImage::systemFormat(), !qt_cleartype_enabled);
+
+ /*If cleartype is enabled we use the standard system format even on Windows CE
+ and not the special textbuffer format we have to use if cleartype is disabled*/
+
ni->image.fill(0xffffffff);
HDC hdc = ni->hdc;
@@ -1437,7 +1442,6 @@ QNativeImage *QFontEngineWin::drawGDIGlyph(HFONT font, glyph_t glyph, int margin
}
-extern bool qt_cleartype_enabled;
extern uint qt_pow_gamma[256];
QImage QFontEngineWin::alphaMapForGlyph(glyph_t glyph, const QTransform &xform)