summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp
index 05e2b0ca03..4f463dd77c 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp
@@ -1149,7 +1149,9 @@ glyph_metrics_t QWindowsFontEngine::alphaMapBoundingBox(glyph_t glyph, QFixed, c
QImage QWindowsFontEngine::alphaMapForGlyph(glyph_t glyph, const QTransform &xform)
{
HFONT font = hfont;
- if (m_fontEngineData->clearTypeEnabled) {
+
+ bool clearTypeTemporarilyDisabled = (m_fontEngineData->clearTypeEnabled && m_logfont.lfQuality != NONANTIALIASED_QUALITY);
+ if (clearTypeTemporarilyDisabled) {
LOGFONT lf = m_logfont;
lf.lfQuality = ANTIALIASED_QUALITY;
font = CreateFontIndirect(&lf);
@@ -1188,7 +1190,7 @@ QImage QWindowsFontEngine::alphaMapForGlyph(glyph_t glyph, const QTransform &xfo
// Cleanup...
delete mask;
- if (m_fontEngineData->clearTypeEnabled) {
+ if (clearTypeTemporarilyDisabled) {
DeleteObject(font);
}