diff options
author | Jørgen Lind <jorgen.lind@digia.com> | 2014-05-06 10:17:51 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-06 16:35:56 +0200 |
commit | 2bc619c30ef08c9b5e2aaa3370d184670acd73ad (patch) | |
tree | 21985f2ee0704a0f8fb4d8eb3e1d028ee0fda5ef /src/gui/text | |
parent | c76d8c42b2fd87f620a4ea47a5c4134a084e4142 (diff) |
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 <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qfontengine.cpp | 9 | ||||
-rw-r--r-- | src/gui/text/qfontengine_p.h | 2 |
2 files changed, 11 insertions, 0 deletions
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) { diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h index 5e40abbda6..fc849d788f 100644 --- a/src/gui/text/qfontengine_p.h +++ b/src/gui/text/qfontengine_p.h @@ -251,6 +251,8 @@ public: static QByteArray convertToPostscriptFontFamilyName(const QByteArray &fontFamily); + virtual bool hasUnreliableGlyphOutline() const; + enum HintStyle { HintNone, HintLight, |