qt6-bb10/tests/auto/gui
Eskil Abrahamsen Blomfeldt 93f32fd47a test: Fix test for oblique/italic equivalence
The tst_QFont::italicOblique() test is testing whether
a request for an "Oblique" font in the presence of an italic
one (or vice versa) may return the other as a second-best match.

However, it did not consider the fact that some fonts may not
be marked as italic even if the style name contains the word
"italic". One instance of this are variable fonts with oblique
instances. In this case we currently do not correctly recognize
the fonts as oblique.

But there is nothing preventing someone from creating a normal
font that has "italic" in the style name and not setting it as
italic in the OS/2 table (maybe the style name is "non-italic"),
so we can't really depend on this.

This makes the test a bit more robust by checking if the actual
font stored in the database is italic and verifying a match with
the requested oblique font. There are still cases that might
fail here, but we don't need to address those unless they
actually appear.

Pick-to: 6.5
Fixes: QTBUG-131108
Task-number: QTBUG-131262
Change-Id: I9ae0d37d378e8fec2be524db203dcea9a881f15a
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 957e2be00a5c45223a5ef842a5f9f2f7b7be882b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-19 13:06:56 +00:00
..
image Add REUSE.toml files 2024-11-07 08:38:49 +01:00
itemmodels QFileSystemModel on Windows: consistently trim spaces and dots 2024-10-29 17:42:12 +00:00
kernel Tests: Reduce the number of module includes 2024-11-04 19:42:27 +00:00
math3d tst_qmatrixnxn: Mark variable as unused to avoid compiler warning 2024-05-29 20:27:18 +02:00
painting Fix text drawing onto transparent ARGB32 2024-10-10 15:18:36 +00:00
platform Tests: Reduce the number of module includes 2024-11-04 19:42:27 +00:00
qopengl Change license for tests files 2024-02-04 09:56:42 +01:00
qopenglconfig Change license for tests files 2024-02-04 09:56:42 +01:00
qvulkan Vulkan test: replace QVERIFY with appropriate QCOMPARE 2024-09-23 19:36:54 +00:00
rhi Revert "Skip Vulkan on Android in QRhi autotest" 2024-04-05 20:31:07 +00:00
text test: Fix test for oblique/italic equivalence 2024-11-19 13:06:56 +00:00
util QDesktopServices: clean up pre-Qt-6.6 code 2024-05-15 18:22:39 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00