summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-05-18 10:16:33 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-05-18 10:40:59 (GMT)
commitc354bc1d567874dd58db6abecf9d5796dfd721be (patch)
treea0e489a3bac1ac1c85aeca0d4c851ba34e6abef6 /src/gui/text
parent5e38a334b1ef46a932c8aff65a7d448b5c7df853 (diff)
downloadQt-c354bc1d567874dd58db6abecf9d5796dfd721be.zip
Qt-c354bc1d567874dd58db6abecf9d5796dfd721be.tar.gz
Qt-c354bc1d567874dd58db6abecf9d5796dfd721be.tar.bz2
Fix broken drawing with large fonts using QStaticText and FreeType
In FreeType, there's a fall back to QFontEngine::alphaMapForGlyph() when the fonts are very large. Since this uses a QPainterPath containing an unhinted glyph, the use of hinted metrics would sometimes lead to the glyphs being clipped because they would be positioned slightly outside the image they were painted into. When outline drawing is on, it makes sense to return unhinted metrics, since the glyphs we will actually use are unhinted. Task-number: QTBUG-19067 Reviewed-by: Jiang Jiang
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfontengine_ft.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index c74ecc8..c4e89d5 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -909,7 +909,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph, Glyph
}
}
- if (default_hint_style == HintNone)
+ if (default_hint_style == HintNone || set->outline_drawing)
load_flags |= FT_LOAD_NO_HINTING;
else
load_flags |= load_target;