From 2bc619c30ef08c9b5e2aaa3370d184670acd73ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Tue, 6 May 2014 10:17:51 +0200 Subject: Add virtual function to QFontEngine report if outlines are reliable GetGlyphOutline fails for ttf fonts with embedded bitmaps. This results in distancefield rendering not rendering glyphs (for the failed paths). We need to fall back to texture rendering if this is the case. Change-Id: Ibdf7dc5c1d34f513c436f88fabbdcc4089bb6fef Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qfontengine.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/gui/text/qfontengine.cpp') diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index b2254c4826..078e16574f 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -1335,6 +1335,15 @@ QByteArray QFontEngine::convertToPostscriptFontFamilyName(const QByteArray &fami return f; } +/** + * Some font engines like the windows font engine + * can not reliable create outline paths + */ +bool QFontEngine::hasUnreliableGlyphOutline() const +{ + return false; +} + QFixed QFontEngine::lastRightBearing(const QGlyphLayout &glyphs, bool round) { if (glyphs.numGlyphs >= 1) { -- cgit v1.2.3