From ff085e2591e8257c373db1c52475b9b54c3da56b Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 3 Jul 2017 11:53:44 +0200 Subject: 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 --- .../data/text/text_bengali_noshaping.qml | 15 +++++++++++++++ .../data/text/text_latin_noshaping.qml | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 tests/manual/scenegraph_lancelot/data/text/text_bengali_noshaping.qml create mode 100644 tests/manual/scenegraph_lancelot/data/text/text_latin_noshaping.qml (limited to 'tests/manual') diff --git a/tests/manual/scenegraph_lancelot/data/text/text_bengali_noshaping.qml b/tests/manual/scenegraph_lancelot/data/text/text_bengali_noshaping.qml new file mode 100644 index 0000000000..343d5768e4 --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/text/text_bengali_noshaping.qml @@ -0,0 +1,15 @@ +import QtQuick 2.0 + +Item { + width: 320 + height: 480 + + Text { + anchors.fill: parent + wrapMode: Text.WrapAtWordBoundaryOrAnywhere + font.family: "Arial" // Should use Lohit Bengali + font.pixelSize: 20 + font.preferShaping: false + text: "ধারা ১: সমস্ত মানুষ স্বাধীনভাবে সমান মর্যাদা এবং অধিকার নিয়ে জন্মগ্রহণ করে। তাঁদের বিবেক এবং বুদ্ধি আছে; সুতরাং সকলেরই একে অপরের প্রতি ভ্রাতৃত্বসুলভ মনোভাব নিয়ে আচরণ করা উচিৎ।" + } +} diff --git a/tests/manual/scenegraph_lancelot/data/text/text_latin_noshaping.qml b/tests/manual/scenegraph_lancelot/data/text/text_latin_noshaping.qml new file mode 100644 index 0000000000..6dc6c2f3d6 --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/text/text_latin_noshaping.qml @@ -0,0 +1,15 @@ +import QtQuick 2.0 + +Item { + width: 320 + height: 480 + + Text { + anchors.fill: parent + wrapMode: Text.WrapAtWordBoundaryOrAnywhere + font.family: "Arial" + font.pixelSize: 20 + font.preferShaping: false + text: "Are griffins birds or mammals?" + } +} -- cgit v1.2.3 From 5946917178521f5af0e191fa5c53653b07c27034 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 25 Aug 2017 13:44:07 +0200 Subject: pointerhandler manual tests: enable hi-dpi scaling by default Change-Id: I6af55e11f02592f122be54d3d235c69537f3f7fc Reviewed-by: Mitch Curtis --- tests/manual/pointer/main.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/manual') diff --git a/tests/manual/pointer/main.cpp b/tests/manual/pointer/main.cpp index 7935b4072c..5f6af79973 100644 --- a/tests/manual/pointer/main.cpp +++ b/tests/manual/pointer/main.cpp @@ -44,6 +44,7 @@ int main(int argc, char *argv[]) { + QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; -- cgit v1.2.3