aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickglobal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/util/qquickglobal.cpp')
-rw-r--r--src/quick/util/qquickglobal.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/quick/util/qquickglobal.cpp b/src/quick/util/qquickglobal.cpp
index 6df23cdff5..14ead56740 100644
--- a/src/quick/util/qquickglobal.cpp
+++ b/src/quick/util/qquickglobal.cpp
@@ -303,6 +303,7 @@ public:
QV4::ScopedValue vwspac(scope, obj->get((s = v4->newString(QStringLiteral("wordSpacing")))));
QV4::ScopedValue vhint(scope, obj->get((s = v4->newString(QStringLiteral("hintingPreference")))));
QV4::ScopedValue vkerning(scope, obj->get((s = v4->newString(QStringLiteral("kerning")))));
+ QV4::ScopedValue vshaping(scope, obj->get((s = v4->newString(QStringLiteral("preferShaping")))));
// pull out the values, set ok to true if at least one valid field is given.
if (vbold->isBoolean()) {
@@ -361,6 +362,13 @@ public:
retn.setKerning(vkerning->booleanValue());
if (ok) *ok = true;
}
+ if (vshaping->isBoolean()) {
+ bool enable = vshaping->booleanValue();
+ if (enable)
+ retn.setStyleStrategy(static_cast<QFont::StyleStrategy>(retn.styleStrategy() & ~QFont::PreferNoShaping));
+ else
+ retn.setStyleStrategy(static_cast<QFont::StyleStrategy>(retn.styleStrategy() | QFont::PreferNoShaping));
+ }
return retn;
}