summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/lancelot/scripts/statictext.qps
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-06-05 08:07:14 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-06-08 06:45:49 +0200
commit3279c8e7d72c5eee379fa8e4a2789acfe40445c0 (patch)
tree7d944b86759be03bd9334675d735e4fd45497852 /tests/auto/other/lancelot/scripts/statictext.qps
parent69795835f3a578f60b16f09943feee6326087342 (diff)
Move some flaky text tests into Lancelot
There are some slight differences between normal drawText() and QGlyphRuns/QStaticText for decoration widths in certain fonts. We decided to accept this and tried working around it in the test by using ForceIntegerMetrics (since the difference is < 0.5 pixel). This enum has been deprecated, so we move the tests into Lancelot instead, since the idea here is to test for regressions, not to compare the two painter commands. Note that there is something off about decorations with drawGlyphRuns() and drawStaticText() which is exposed (not caused) by this, perhaps related to using a matrix for positioning, since that was untested before. This also takes the liberty of moving the emoji test string from text.qps, since this was not in the statictext.qps yet. Change-Id: Ib2d697095cbd11829cdd50b3c0268c85e9607c78 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'tests/auto/other/lancelot/scripts/statictext.qps')
-rw-r--r--tests/auto/other/lancelot/scripts/statictext.qps35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/auto/other/lancelot/scripts/statictext.qps b/tests/auto/other/lancelot/scripts/statictext.qps
index 6b7b97d8fa..c2a30d0864 100644
--- a/tests/auto/other/lancelot/scripts/statictext.qps
+++ b/tests/auto/other/lancelot/scripts/statictext.qps
@@ -138,3 +138,38 @@ save
setPen black
repeat_block text_drawing
restore
+
+translate 150 0
+save
+ setPen black
+ setFont "sansserif" 16 normal
+ drawStaticText 0 40 "e😃m😇o😍j😜i😸!"
+restore
+
+translate 0 55
+save
+ setPen black
+ setFont "sansserif" 12 normal normal default underline
+ drawStaticText 0 20 "Underlined text drawing"
+restore
+
+translate 0 35
+save
+ setPen black
+ setFont "sansserif" 12 normal normal default normal strikeout
+ drawStaticText 0 20 "Struck out text drawing"
+restore
+
+translate 0 35
+save
+ setPen black
+ setFont "sansserif" 12 normal normal default normal normal overline
+ drawStaticText 0 20 "Overlined text drawing"
+restore
+
+translate 0 35
+save
+ setPen black
+ setFont "sansserif" 12 normal normal default underline strikeout overline
+ drawStaticText 0 20 "All the effects text drawing"
+restore