summaryrefslogtreecommitdiffstats
path: root/tests/baseline
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2022-11-30 14:52:13 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2022-12-12 19:25:45 +0100
commit58907dfa812de8ce6c63295589f644bdf4257d15 (patch)
treedf8f307a4a07bbc33dbbbc4857f0b985249a9688 /tests/baseline
parent6e3170b674d7ae3f2f00f982798a21c635ba3926 (diff)
Try to match variant-selector font to preceding character
Variant-selectors are special unicode symbols which are used to modify glyph selection for the preceding character. For instance, a regular symbol could be turned into a color emoji using VS16, the emoji variation selector. In order for this to work, however, the font that handles the selector has to handle the full pair of characters, so that it can apply the correct substitution rules. One specific example of this was on macOS, where an airplane symbol + VS16 would match the symbol to the default UI font but the VS16 to the emoji font. Since there string provided for the emoji font did not have any preceding character for VS16, we just ignored it. To improve on this, we now detect variation selectors that have been matched to different font engines than the preceding character. When such a case occurs, we check if the selector font also supports the preceding character, and if it does, we keep the pair together and use the same font for both. [ChangeLog][QtGui][Text] Fix some cases where a variation-selector character would be ignored in font selection and the correct variant of a character would thus not be selected. Task-number: QTBUG-108799 Change-Id: I9f427e0520e652ee2f24a4f7dc3c1957251e06bd Reviewed-by: Tor Arne Vestbรธ <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/baseline')
-rw-r--r--tests/baseline/painting/scripts/text.qps2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/baseline/painting/scripts/text.qps b/tests/baseline/painting/scripts/text.qps
index 4d81b3084c..6bacdfd5e6 100644
--- a/tests/baseline/painting/scripts/text.qps
+++ b/tests/baseline/painting/scripts/text.qps
@@ -165,7 +165,7 @@ translate 0 75
save
setPen black
setFont "sansserif" 16 normal
- drawText 0 40 "e๐Ÿ˜ƒm๐Ÿ˜‡o๐Ÿ˜j๐Ÿ˜œi๐Ÿ˜ธ!"
+ drawText 0 40 "e๐Ÿ˜ƒm๐Ÿ˜‡o๐Ÿ˜j๐Ÿ˜œi๐Ÿ˜ธ!โœˆ๏ธ"
restore
translate 0 75