Qt 6.8.3 with BlackBerry 10 (QNX 8 / ARMv7) patches
 
 
 
 
 
 
Go to file
Eskil Abrahamsen Blomfeldt 4a935a192e Improve hinted rendering quality on Windows
When rendering hinted text on Windows with DirectWrite, the goal was
to keep the rendering and metrics as close to GDI as possible,
minimizing the impact of changing the default font backend.

Therefore, the DWRITE_RENDERING_MODE_GDI_CLASSIC was always preferred
when hinting was on.

However, DWRITE_RENDERING_MODE_GDI_CLASSIC only applies antialiasing
in the horizontal direction, but GDI applies vertical antialiasing
as well. The result is that text will look more aliased with
DirectWrite than it did with GDI, which arguably looks ugly
especially at large sizes and can be perceived as a regression.

Microsoft documentation recommends using symmetric antialiasing
when the pixel size exceeds 16, so this patch enables
DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC for fonts larger than
16px regardless of whether hinting is on.

It's worth noting that for fonts with heavy hinting, such as
Times New Roman, the rendering using
DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC is different from
GDI, although more similar to Freetype. However, the impact
of not having vertical antialiasing is worse and as native apps
are moving towards using DirectWrite, the GDI rendering is not
going to be the definition of a "native" look anymore.

A second thing to note in this patch is that we always pass in false
for the useGdiNatural argument in GetGdiCompatibleGlyphMetrics().
According to the documentation, we should be passing in true for text
rendered with CLEARTYPE_NATURAL_QUALITY. However, doing this causes
wider kerning in certain cases. Since the tighter kerning matches
the layouts we get in native apps, as well as when using Freetype,
I've chosen to pass false for now, to be consistent.

This change also adds a manual test which can be used to switch
between DirectWrite, GDI and Freetype rendering on Windows, so
that it's easy to compare.

[ChangeLog][Windows] Improved hinted text rendering at font sizes
larger than 16px.

Fixes: QTBUG-131946
Change-Id: Iebbe5c7affe7df6266ade6b161c31bde3d2caa84
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 407a98d94fb05780f30e77463fb2bd535041a044)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit e59362678880cf89a2e7870365a030f0b9c254a7)
2025-02-08 13:53:37 +00:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
LICENSES Adapt license tag to follow qt_attribution.json 2025-02-03 18:07:25 +01:00
bin CMake: Don't hard-code "libexec" in qt-configure-module 2024-08-20 13:50:32 +02:00
cmake CMake: Provide a way to find all available Qt module packages 2025-02-08 14:53:16 +01:00
coin Add calling license check on generated source SBOM 2025-02-03 18:07:34 +01:00
config.tests QThread/Unix: refactor to split QThreadPrivate::finish() in two phases 2024-11-07 15:00:11 -07:00
dist Add REUSE.toml files 2024-11-07 08:38:49 +01:00
doc Doc: Update \externalpage entries for Qt Creator documentation 2025-02-08 13:53:15 +00:00
examples Doc: Update \externalpage entries for Qt Creator documentation 2025-02-08 13:53:15 +00:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
libexec Android: add option to run app detached to runner script 2024-12-04 14:44:52 +00:00
mkspecs Remove unsupported linker script objc_namespace.sh 2025-01-21 10:44:47 +00:00
qmake Doc: Update \externalpage entries for Qt Creator documentation 2025-02-08 13:53:15 +00:00
src Improve hinted rendering quality on Windows 2025-02-08 13:53:37 +00:00
tests Improve hinted rendering quality on Windows 2025-02-08 13:53:37 +00:00
util util/update_public_suffix_list.sh: use commit date, not wall clock 2025-02-02 15:09:25 +00:00
.cmake.conf Bump version to 6.8.3 2025-01-23 11:04:42 +00:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Git ignore Visual Studio CMake build directories 2023-11-24 23:42:05 +01:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.tag
CMakeLists.txt cmake: add _extra_files IDE target from heuristics 2024-04-12 08:36:01 +08:00
REUSE.toml macOS: Enable crash reporting for tests via Swift 2025-01-13 08:36:30 +00:00
config_help.txt CMake: Change SBOM generation to be enabled by default (mostly) 2024-10-21 08:37:20 +00:00
configure Change configure license 2024-02-02 15:23:02 +00:00
configure.bat configure.bat: Use call when calling the helper cmake scripts 2025-01-31 14:16:17 +00:00
configure.cmake CMake: Report success for 'separate_debug_info' where applicable 2024-11-02 16:25:06 +00:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
licenseRule.json Adapt license tag to follow qt_attribution.json 2025-02-03 18:07:25 +01:00
qt_cmdline.cmake configure: accept -c++std c++17 again 2024-06-13 20:40:06 +00:00