diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2017-06-30 10:07:29 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2017-06-30 11:01:52 +0000 |
commit | 441e0b41bf5b700cdaa3b0ba2393c487ed4b9de5 (patch) | |
tree | e30dc7a61e334f9641776a70f9efdc7822f6f8e9 /src/quick/items/qquicktext.cpp | |
parent | 2969c92c82e67beb592542cb34a3cbd65ed2fb16 (diff) |
Expose "kerning" property for fonts
For text where the content is known, it can be handy to be able
to disable the kerning feature in OpenType to improve performance.
[ChangeLog][Qt Quick][Text] Added "kerning" property to the font
type to support disabling kerning on text.
Task-number: QTBUG-56728
Change-Id: I2e447587a066a7e12c5d38967e0845eaad021014
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick/items/qquicktext.cpp')
-rw-r--r-- | src/quick/items/qquicktext.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp index 080cc9412e..1bcfbd41f7 100644 --- a/src/quick/items/qquicktext.cpp +++ b/src/quick/items/qquicktext.cpp @@ -1499,6 +1499,19 @@ QQuickText::~QQuickText() Text { text: "Hello"; renderType: Text.NativeRendering; font.hintingPreference: Font.PreferVerticalHinting } \endqml */ + +/*! + \qmlproperty bool QtQuick::Text::font.kerning + \since 5.10 + + Enables or disables the kerning OpenType feature when shaping the text. This may improve performance + when creating or changing the text, at the expense of some cosmetic features. The default value + is true. + + \qml + Text { text: "OATS FLAVOUR WAY"; font.kerning: false } + \endqml +*/ QFont QQuickText::font() const { Q_D(const QQuickText); |