aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextnode.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@digia.com>2014-04-30 10:44:55 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-07 10:57:34 +0200
commit6da1090cfd7918fdacfea3ed20ac63c962928b36 (patch)
tree7f5efdf54f0e57c53f3e31ff7db84647f9ec0aba /src/quick/items/qquicktextnode.cpp
parentd82a17b929dd88fe76258b0f801beaa1b2ee343e (diff)
QWindowsFontEnginge uses GetGlyphOutline which seems to fail
for fonts containing embedded bitmaps. Change-Id: I035df24d16f1c9707fff54b0920c8139fda3ddec Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/quick/items/qquicktextnode.cpp')
-rw-r--r--src/quick/items/qquicktextnode.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/quick/items/qquicktextnode.cpp b/src/quick/items/qquicktextnode.cpp
index 1133636a74..da0d9cd714 100644
--- a/src/quick/items/qquicktextnode.cpp
+++ b/src/quick/items/qquicktextnode.cpp
@@ -144,8 +144,15 @@ QSGGlyphNode *QQuickTextNode::addGlyphs(const QPointF &position, const QGlyphRun
{
QSGRenderContext *sg = QQuickItemPrivate::get(m_ownerElement)->sceneGraphRenderContext();
QRawFont font = glyphs.rawFont();
- bool smoothScalable = QFontDatabase().isSmoothlyScalable(font.familyName(), font.styleName());
- bool preferNativeGlyphNode = m_useNativeRenderer || !smoothScalable;
+ bool preferNativeGlyphNode = m_useNativeRenderer;
+ if (!preferNativeGlyphNode) {
+ QRawFontPrivate *fontPriv = QRawFontPrivate::get(font);
+ if (fontPriv->fontEngine->hasUnreliableGlyphOutline())
+ preferNativeGlyphNode = true;
+ else
+ preferNativeGlyphNode = !QFontDatabase().isSmoothlyScalable(font.familyName(), font.styleName());
+ }
+
QSGGlyphNode *node = sg->sceneGraphContext()->createGlyphNode(sg, preferNativeGlyphNode);
node->setOwnerElement(m_ownerElement);