From 434868e9d3cab37b304d7511cd62616d7cd6e032 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 4 Feb 2015 13:54:07 +0100 Subject: REG: Fix misplaced outline drawn text with native rendering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change c238d34137ffe80d30933733a12aa2893b9631c2 was a refactoring which slightly changed behavior. In the case of fetching the alpha map's bounding box, before we would call loadGlyph() even for the case of outline drawing, as the correct bounding rect is still needed for this case. In loadGlyphFor() however, 0 was always returned for this case, as it was only used for populating the cache. The simple fix for this is to add a bool to loadGlyphFor() which adapts the original behavior when set, similar to the fetchMetricsOnly bool in the loadGlyph() functions. Change-Id: I76296c8aaeddbdae9e4c27ed2b30b7d59ff0843b Task-number: QTBUG-44273 Reviewed-by: Konstantin Ritt Reviewed-by: Pasi Petäjäjärvi Reviewed-by: Simon Hausmann --- src/gui/text/qfontengine_ft_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/text/qfontengine_ft_p.h') diff --git a/src/gui/text/qfontengine_ft_p.h b/src/gui/text/qfontengine_ft_p.h index 383902c784..b40893c445 100644 --- a/src/gui/text/qfontengine_ft_p.h +++ b/src/gui/text/qfontengine_ft_p.h @@ -266,7 +266,7 @@ private: inline Glyph *loadGlyph(uint glyph, QFixed subPixelPosition, GlyphFormat format = Format_None, bool fetchMetricsOnly = false) const { return loadGlyph(cacheEnabled ? &defaultGlyphSet : 0, glyph, subPixelPosition, format, fetchMetricsOnly); } Glyph *loadGlyph(QGlyphSet *set, uint glyph, QFixed subPixelPosition, GlyphFormat = Format_None, bool fetchMetricsOnly = false) const; - Glyph *loadGlyphFor(glyph_t g, QFixed subPixelPosition, GlyphFormat format, const QTransform &t); + Glyph *loadGlyphFor(glyph_t g, QFixed subPixelPosition, GlyphFormat format, const QTransform &t, bool fetchBoundingBox = false); QGlyphSet *loadTransformedGlyphSet(const QTransform &matrix); -- cgit v1.2.3