diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2018-11-09 17:56:08 +0100 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2018-11-30 16:15:03 +0000 |
commit | 17ced070fd1e55948659bc37c421f98074910599 (patch) | |
tree | 2cc19157f873a7732ad4f470f8d6a872f5c42b5a /src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h | |
parent | d23d146175d6fab2ede50818777afe248ca0be23 (diff) |
Read font selection flags and use them when querying for metrics
Certain fonts with multiple styles have the same family name. When
loading these as application fonts we were not specific enough when
querying for the text metrics. This meant that e.g. the bold version in
a font family would get the metrics of the regular one.
Fixes: QTBUG-67273
Change-Id: Ic988d62cddde0a1f77ddcaf2891cadc21c9b31e6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h')
-rw-r--r-- | src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h index ab6d6307c7..9d0aa7f723 100644 --- a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h +++ b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h @@ -177,6 +177,14 @@ struct QFontNames QString preferredStyle; // e.g. "Condensed Italic" }; +struct QFontValues +{ + quint16 weight = 0; + bool isItalic = false; + bool isOverstruck = false; + bool isUnderlined = false; +}; + bool qt_localizedName(const QString &name); QString qt_getEnglishName(const QString &familyName, bool includeStyle = false); QFontNames qt_getCanonicalFontNames(const LOGFONT &lf); |