diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2019-04-02 15:33:16 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2019-04-04 10:24:57 +0000 |
commit | bcd2fa484a4fe93e77743195d7f72cce9e580d43 (patch) | |
tree | cbe6501545af10348913756c98b4b2fa8b6cbae3 /src/gui/text/qplatformfontdatabase.h | |
parent | e2fdd7a9cbc6293c07b7c316b9ea3e9f4d6faf29 (diff) |
Fix font matching of typographic families on Windows
9204b8c31ea1b5f0c05870c5b5d74c33b1a4f622 broke font matching on Windows.
After this change, if you request a specific face of a family, such
as "Arial Black", and Qt detects that its typographic/preferred name
is "Arial", then it will be added as the single style of the Arial family,
which will in turn be set as populated=true.
So if you later request a regular font of "Arial" family, then it will
see that the family has already been populated, skip this step, and
then see that there is only one style available, i.e. "Arial Black".
To work around this, we need to make sure the typographic family is
properly populated the first time it is registered.
[ChangeLog][Windows][Fonts] Fixed a bug where it would be impossible
to request different faces of a font family after a specific type face
has been in use.
Task-number: QTBUG-74748
Change-Id: Ia0caace2b88a32e6114ff23ad10ee1ea8f5a3e03
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/gui/text/qplatformfontdatabase.h')
-rw-r--r-- | src/gui/text/qplatformfontdatabase.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/text/qplatformfontdatabase.h b/src/gui/text/qplatformfontdatabase.h index f4558129a7..38ba7f10b2 100644 --- a/src/gui/text/qplatformfontdatabase.h +++ b/src/gui/text/qplatformfontdatabase.h @@ -139,6 +139,8 @@ public: static void registerFontFamily(const QString &familyName); static void registerAliasToFontFamily(const QString &familyName, const QString &alias); + + static bool isFamilyPopulated(const QString &familyName); }; QT_END_NAMESPACE |