diff options
Diffstat (limited to 'tests/manual/scenegraph_lancelot/data/text')
9 files changed, 344 insertions, 0 deletions
diff --git a/tests/manual/scenegraph_lancelot/data/text/text_advance_bidi_ltr.qml b/tests/manual/scenegraph_lancelot/data/text/text_advance_bidi_ltr.qml new file mode 100644 index 0000000000..e5d230e309 --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/text/text_advance_bidi_ltr.qml @@ -0,0 +1,56 @@ +import QtQuick 2.10 + +Item { + width: 320 + height: 480 + + property string firstWord: "One, שתיים, " + property string secondWord: "Three" + + Text { + id: referenceText + text: firstWord + secondWord + anchors.centerIn: parent + font.italic: true + font.pixelSize: 30 + } + + Text { + id: firstWordItem + anchors.left: referenceText.left + anchors.top: referenceText.bottom + text: firstWord + font: referenceText.font + } + + Text { + id: secondWordItem + anchors.left: firstWordItem.left + anchors.leftMargin: firstWordItem.advance.width + anchors.baseline: firstWordItem.baseline + anchors.baselineOffset: firstWordItem.advance.height + text: secondWord + font: referenceText.font + } + + Text { + id: firstWordItemRichText + anchors.left: referenceText.left + anchors.top: secondWordItem.bottom + text: firstWord + font: referenceText.font + textFormat: Text.RichText + } + + Text { + id: secondWordItemRichText + anchors.left: firstWordItemRichText.left + anchors.leftMargin: firstWordItemRichText.advance.width + anchors.baseline: firstWordItemRichText.baseline + anchors.baselineOffset: firstWordItemRichText.advance.height + text: secondWord + font: referenceText.font + textFormat: Text.RichText + } + +} diff --git a/tests/manual/scenegraph_lancelot/data/text/text_advance_hebrew.qml b/tests/manual/scenegraph_lancelot/data/text/text_advance_hebrew.qml new file mode 100644 index 0000000000..000977f964 --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/text/text_advance_hebrew.qml @@ -0,0 +1,54 @@ +import QtQuick 2.10 + +Item { + width: 320 + height: 480 + + property string firstWord: "תורת רב־לשוני אנא " + property string secondWord: "של" + + Text { + id: referenceText + text: firstWord + secondWord + anchors.centerIn: parent + font.italic: true + font.pixelSize: 30 + } + + Text { + id: firstWordItem + anchors.right: referenceText.right + anchors.top: referenceText.bottom + text: firstWord + font: referenceText.font + } + + Text { + id: secondWordItem + anchors.right: firstWordItem.left + anchors.baseline: firstWordItem.baseline + anchors.baselineOffset: firstWordItem.advance.height + text: secondWord + font: referenceText.font + } + + Text { + id: firstWordItemRichText + anchors.right: referenceText.right + anchors.top: secondWordItem.bottom + text: firstWord + font: referenceText.font + textFormat: Text.RichText + } + + Text { + id: secondWordItemRichText + anchors.right: firstWordItemRichText.left + anchors.baseline: firstWordItemRichText.baseline + anchors.baselineOffset: firstWordItemRichText.advance.height + text: secondWord + font: referenceText.font + textFormat: Text.RichText + } + +} diff --git a/tests/manual/scenegraph_lancelot/data/text/text_advance_latin.qml b/tests/manual/scenegraph_lancelot/data/text/text_advance_latin.qml new file mode 100644 index 0000000000..f5fc501bb8 --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/text/text_advance_latin.qml @@ -0,0 +1,55 @@ +import QtQuick 2.10 + +Item { + width: 320 + height: 480 + + property string firstWord: "Hello " + property string secondWord: "World" + + Text { + id: referenceText + text: firstWord + secondWord + anchors.centerIn: parent + font.italic: true + font.pixelSize: 30 + } + + Text { + id: firstWordItem + anchors.left: referenceText.left + anchors.top: referenceText.bottom + text: firstWord + font: referenceText.font + } + + Text { + id: secondWordItem + anchors.left: firstWordItem.left + anchors.leftMargin: firstWordItem.advance.width + anchors.baseline: firstWordItem.baseline + anchors.baselineOffset: firstWordItem.advance.height + text: secondWord + font: referenceText.font + } + + Text { + id: firstWordItemRichText + anchors.left: referenceText.left + anchors.top: secondWordItem.bottom + text: firstWord + font: referenceText.font + textFormat: Text.RichText + } + + Text { + id: secondWordItemRichText + anchors.left: firstWordItemRichText.left + anchors.leftMargin: firstWordItemRichText.advance.width + anchors.baseline: firstWordItemRichText.baseline + anchors.baselineOffset: firstWordItemRichText.advance.height + text: secondWord + font: referenceText.font + textFormat: Text.RichText + } +} diff --git a/tests/manual/scenegraph_lancelot/data/text/text_advance_multiline.qml b/tests/manual/scenegraph_lancelot/data/text/text_advance_multiline.qml new file mode 100644 index 0000000000..a58a7cb40c --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/text/text_advance_multiline.qml @@ -0,0 +1,55 @@ +import QtQuick 2.10 + +Item { + width: 320 + height: 480 + + property string firstWord: "One,\nTwo, " + property string secondWord: "Three" + + Text { + id: referenceText + text: firstWord + secondWord + anchors.centerIn: parent + font.italic: true + font.pixelSize: 30 + } + + Text { + id: firstWordItem + anchors.left: referenceText.left + anchors.top: referenceText.bottom + text: firstWord + font: referenceText.font + } + + Text { + id: secondWordItem + anchors.left: firstWordItem.left + anchors.leftMargin: firstWordItem.advance.width + anchors.baseline: firstWordItem.baseline + anchors.baselineOffset: firstWordItem.advance.height + text: secondWord + font: referenceText.font + } + + Text { + id: firstWordItemRichText + anchors.left: referenceText.left + anchors.top: secondWordItem.bottom + text: firstWord + font: referenceText.font + textFormat: Text.RichText + } + + Text { + id: secondWordItemRichText + anchors.left: firstWordItemRichText.left + anchors.leftMargin: firstWordItemRichText.advance.width + anchors.baseline: firstWordItemRichText.baseline + anchors.baselineOffset: firstWordItemRichText.advance.height + text: secondWord + font: referenceText.font + textFormat: Text.RichText + } +} diff --git a/tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph.qml b/tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph.qml new file mode 100644 index 0000000000..0627656ea6 --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph.qml @@ -0,0 +1,39 @@ +import QtQuick 2.10 + +Item { + width: 320 + height: 480 + + property string firstWord: "<p>One,</p><p>Two, " + property string secondWord: "Three</p>" + + Text { + id: referenceText + text: firstWord + secondWord + anchors.centerIn: parent + font.italic: true + font.pixelSize: 30 + textFormat: Text.RichText + } + + + Text { + id: firstWordItemRichText + anchors.left: referenceText.left + anchors.top: referenceText.bottom + text: firstWord + font: referenceText.font + textFormat: Text.RichText + } + + Text { + id: secondWordItemRichText + anchors.left: firstWordItemRichText.left + anchors.leftMargin: firstWordItemRichText.advance.width + anchors.baseline: firstWordItemRichText.baseline + anchors.baselineOffset: firstWordItemRichText.advance.height + text: secondWord + font: referenceText.font + textFormat: Text.RichText + } +} diff --git a/tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph_multifontsizes.qml b/tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph_multifontsizes.qml new file mode 100644 index 0000000000..fb1f252148 --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/text/text_advance_multiparagraph_multifontsizes.qml @@ -0,0 +1,39 @@ +import QtQuick 2.10 + +Item { + width: 320 + height: 480 + + property string firstWord: "<p style=\"font-size: 40pt\">One,</p><p>Two, " + property string secondWord: "Three</p>" + + Text { + id: referenceText + text: firstWord + secondWord + anchors.centerIn: parent + font.italic: true + font.pixelSize: 30 + textFormat: Text.RichText + } + + + Text { + id: firstWordItemRichText + anchors.left: referenceText.left + anchors.top: referenceText.bottom + text: firstWord + font: referenceText.font + textFormat: Text.RichText + } + + Text { + id: secondWordItemRichText + anchors.left: firstWordItemRichText.left + anchors.leftMargin: firstWordItemRichText.advance.width + anchors.baseline: firstWordItemRichText.baseline + anchors.baselineOffset: firstWordItemRichText.advance.height + text: secondWord + font: referenceText.font + textFormat: Text.RichText + } +} 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?" + } +} diff --git a/tests/manual/scenegraph_lancelot/data/text/text_nokerning_latin.qml b/tests/manual/scenegraph_lancelot/data/text/text_nokerning_latin.qml new file mode 100644 index 0000000000..fd1d082c99 --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/text/text_nokerning_latin.qml @@ -0,0 +1,16 @@ +import QtQuick 2.0 + +Item { + width: 320 + height: 480 + + Text { + text: "OATS FLAVOUR WAY" + anchors.centerIn: parent + + font.family: "Times New Roman" + font.italic: true + font.pixelSize: 30 + font.kerning: false + } +} |