qt5base-lts/tests/auto/gui
Eskil Abrahamsen Blomfeldt 6ca48a847a Fix fallback fonts for non-common writing system
When we request fallback fonts, we cannot discriminate the fonts
based on the writing system support. This is especially important
since common script is now merged with other scripts, meaning that
a common script character will always go through the fallback
mechanism when not supported by the main font. When drawing
for instance a string of Devanagari characters on macOS, we would
get a list of 33 fallback fonts, but almost all of them would be
the default Devanagari font, since none of the other fallbacks
would support that script. Meaning that we would just check the
same font over and over, which makes no sense. The fallback list
has been retrieved specifically for the given script, so we do
not need to consider that when fetching the fonts.

For most of the common set, we will not have noticed the bug,
because at least one of the writing system-specific fallbacks will
have had support for latin characters as well. But when trying to
mix emojis and some non-common script, we would get a box in
place of the emoji, which had been adopted to the main script and
would only be looked for in the fonts supporting this.

Note that this exposed an issue with the QRawFont test on some
systems. When the sample text contained a space, it would
be possible to get a fallback font for this character, since
we now effectively support fallbacks. This is not the correct
behavior, but it is unrelated to this fix, and it was not what
the QRawFont::unsupportedWritingSystem() test was written to
check. I have therefore removed the space from the sample text
to make the test pass, and will make a separate task of fixing
the issue of merging fonts for whitespace characters.

[ChangeLog][QtGui][Text] Fixed a bug where mixing different
writing systems with emojis could lead to missing glyphs.

Task-number: QTBUG-61882
Change-Id: I00f6043bb01af1f2277723ccf643034aebf3e18f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2018-01-08 12:28:28 +00:00
..
image Fix convertToFormat with color-tables 2017-09-14 08:13:46 +00:00
itemmodels Fix QStandardItem::setChild crash when passing a null pointer 2017-07-27 19:41:06 +00:00
kernel tests: make exposeEventOnShrink_QTBUG54040 not flakey on xcb 2017-10-17 13:58:36 +00:00
math3d QMatrix4x4: fix aliasing problem in operator*= 2017-04-14 12:29:35 +00:00
painting Fix polygon stroking with cosmetic pen 2017-07-05 12:35:26 +00:00
qopengl Fix blacklisting of tst_QOpenGL in Windows 2017-10-10 07:42:33 +00:00
qopenglconfig Fix tst_QOpenGlConfig for platforms with builtin test data 2017-06-19 07:05:59 +00:00
text Fix fallback fonts for non-common writing system 2018-01-08 12:28:28 +00:00
util Fix test for WinRT 2016-09-23 07:20:53 +00:00
gui.pro Clean up some conditions in our pro files 2016-11-14 19:22:17 +00:00