Eskil Abrahamsen Blomfeldt 3915684fb8 dwrite: Support additional font names for system fonts
Fonts have multiple name fields that users may expect to be able to
use for referring to them. In particular, on Windows it has become
common to use a legacy font family name which contains the sub-family
of the specific font, because of backwards-compatibility reasons.

This is not technically the family of the font, but native
applications will typically list them as such anyway, and Qt would
also do this prior to Qt 6.8 because the GDI backend prioritizes
these.

When we moved to DirectWrite as the new default, these legacy names
for system fonts disappeared from the families list, which is
perceived as a regression.

Now, there was already an implementation for getting the legacy names
for fonts for application fonts, but this had not been implemented
for system fonts when populating the font database.

We rectify this by sharing the code which gets the additional font
names and also calling this when populating system fonts.

[ChangeLog][Windows] Fixed an issue where legacy names such as
'Arial Narrow' would no longer be listed as separate font families.

Fixes: QTBUG-135817
Pick-to: 6.8
Change-Id: I2e1b42b7be926e3b5af7bb2aab3ebe5a1fbe29de
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 6854ea63365ae419a04a470eb17e5f7662f00931)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-06-01 19:57:03 +00:00
2024-11-05 14:36:16 +01:00
2024-11-05 14:36:16 +01:00
2025-05-09 07:47:06 +01:00
2025-05-09 07:47:06 +01:00
2025-03-25 08:40:27 +00:00
2024-06-25 11:44:00 +02:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%