diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2016-03-02 16:37:40 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2016-03-15 08:54:16 +0000 |
commit | 17d435fd8b2ed3a8ac6f93d17d0e78cd61bd7851 (patch) | |
tree | 545828632c0ed5bed996a338ee2291ee85b668a1 /src/imports | |
parent | fe7c2cbab3a8967b7f19f2aae8f5152ab23bf43d (diff) |
Add property for setting hinting preference on fonts
As screen density is rapidly increasing and user interfaces are moving
more and more towards using unhinted text as default, we have to make
it possible to select the hint level from Qt Quick as well. While
this is already partially covered by the unhinted QtRendering render type,
it is still interesting to be able to tweak the native rendering accordingly,
since this is a more precise rasterization. QtRendering also doesn't support
medium hinting.
[ChangeLog][Text] Added "hintingPreference" property to Text, TextEdit and
TextInput.
Change-Id: Ib99dbea24aba082481629deddde88c04cdeb8cdb
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/qtquick2/plugins.qmltypes | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/imports/qtquick2/plugins.qmltypes b/src/imports/qtquick2/plugins.qmltypes index b11906ee09..a1a3723600 100644 --- a/src/imports/qtquick2/plugins.qmltypes +++ b/src/imports/qtquick2/plugins.qmltypes @@ -1730,6 +1730,15 @@ Module { "Capitalize": 4 } } + Enum { + name: "HintingPreference" + values: { + "PreferDefaultHinting": 0, + "PreferNoHinting": 1, + "PreferVerticalHinting": 2, + "PreferFullHinting": 3 + } + } Property { name: "family"; type: "string" } Property { name: "styleName"; type: "string" } Property { name: "bold"; type: "bool" } @@ -1743,6 +1752,7 @@ Module { Property { name: "capitalization"; type: "Capitalization" } Property { name: "letterSpacing"; type: "double" } Property { name: "wordSpacing"; type: "double" } + Property { name: "hintingPreference"; type: "HintingPreference" } Method { name: "toString"; type: "string" } } Component { |