diff options
author | Eskil Abrahamsen Blomfeldt <[email protected]> | 2017-07-03 11:53:44 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <[email protected]> | 2017-08-25 13:57:00 +0000 |
commit | ff085e2591e8257c373db1c52475b9b54c3da56b (patch) | |
tree | eb425d918509b25d2ad652d23a47bea1be6d8037 /src/quick/items/qquicktextedit.cpp | |
parent | d14943f86e758974bcbdd1bcbc20bd2b085970bc (diff) |
Add property to disable shaping on fonts
Major performance improvements can be gained if you know for sure
your text does not require any shaping features. This patch adds
Qt Quick support for the QFont::PreferNoShaping flag (though as a
boolean property to work better with property bindings).
[ChangeLog][QtQuick][Text] Added "font.preferShaping" property to
Text, TextEdit and TextInput. This makes it possible to improve
performance at the expense of some cosmetic font features.
Task-number: QTBUG-56728
Change-Id: Ib4e23d5b21b9d4929562df521347285b2586a62e
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/quick/items/qquicktextedit.cpp')
-rw-r--r-- | src/quick/items/qquicktextedit.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp index 193f804c13..d26d3b0456 100644 --- a/src/quick/items/qquicktextedit.cpp +++ b/src/quick/items/qquicktextedit.cpp @@ -368,6 +368,23 @@ QString QQuickTextEdit::text() const */ /*! + \qmlproperty bool QtQuick::TextEdit::font.preferShaping + \since 5.10 + + Sometimes, a font will apply complex rules to a set of characters in order to + display them correctly. In some writing systems, such as Brahmic scripts, this is + required in order for the text to be legible, but in e.g. Latin script, it is merely + a cosmetic feature. Setting the \c preferShaping property to false will disable all + such features when they are not required, which will improve performance in most cases. + + The default value is true. + + \qml + TextEdit { text: "Some text"; font.preferShaping: false } + \endqml +*/ + +/*! \qmlproperty string QtQuick::TextEdit::text The text to display. If the text format is AutoText the text edit will |