summaryrefslogtreecommitdiffstats
path: root/src/gui/text/windows/qwindowsfontdatabasebase_p.h
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2021-12-02 17:14:18 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2021-12-06 20:06:06 +0100
commit6f542f19bfe7bf3c0729f33d163841fbb6f169e7 (patch)
tree8e952ae89fed338a7e52ba3410cfb5a1c1bd7f19 /src/gui/text/windows/qwindowsfontdatabasebase_p.h
parenteba9196304dcc9129a7bb68db87c6fb42c953090 (diff)
QFontDatabase (Windows): Sanitize font requests early
After the windows font engine was no longer marking everything as scalable we started limiting the font size of requests to the maximum of Courier when it was requested. This was a regression from 5.8 and not in agreement with our documentation. The problem is that we would only make the switch from Courier to Courier New after having already gone through the foundry-lookup and found a closest-available font size for Courier. With this sanitization step in the backend we can make these changes early enough that we haven't yet adjusted e.g. the font size. Pick-to: 6.2 5.15 Fixes: QTBUG-58995 Change-Id: I319e93e6b78c7c3c5539964ac5ab4e05f8902ab6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/gui/text/windows/qwindowsfontdatabasebase_p.h')
-rw-r--r--src/gui/text/windows/qwindowsfontdatabasebase_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/text/windows/qwindowsfontdatabasebase_p.h b/src/gui/text/windows/qwindowsfontdatabasebase_p.h
index 873912f8ef..158991a796 100644
--- a/src/gui/text/windows/qwindowsfontdatabasebase_p.h
+++ b/src/gui/text/windows/qwindowsfontdatabasebase_p.h
@@ -122,6 +122,8 @@ public:
QByteArray m_fontData;
};
+ QFontDef sanitizeRequest(QFontDef request) const;
+
protected:
#if QT_CONFIG(directwrite)