diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2014-11-27 18:28:12 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2014-11-27 18:28:12 +0100 |
commit | ce6990c3e742e0833df0561246554cf07a888efb (patch) | |
tree | 412380582040f5bb314eb90ae029b41a883aa439 /src/plugins/platforms/windows/qwindowsfontengine.cpp | |
parent | 09e674849a40f5eb7e9f95fd2a952c621aec86d1 (diff) | |
parent | fa9bde7d3a12ede956339c570f7b32f95d231e57 (diff) |
Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: Id20053d261b4fbbcc0ac8ba49dd3ef2253fa4b95
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsfontengine.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsfontengine.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp index 376b1bdc37..6b13d93259 100644 --- a/src/plugins/platforms/windows/qwindowsfontengine.cpp +++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp @@ -289,14 +289,15 @@ QWindowsFontEngine::QWindowsFontEngine(const QString &name, qCDebug(lcQpaFonts) << __FUNCTION__ << name << lf.lfHeight; HDC hdc = m_fontEngineData->hdc; SelectObject(hdc, hfont); - fontDef.pixelSize = -lf.lfHeight; const BOOL res = GetTextMetrics(hdc, &tm); - fontDef.fixedPitch = !(tm.tmPitchAndFamily & TMPF_FIXED_PITCH); if (!res) { qErrnoWarning("%s: GetTextMetrics failed", __FUNCTION__); ZeroMemory(&tm, sizeof(TEXTMETRIC)); } + fontDef.pixelSize = -lf.lfHeight; + fontDef.fixedPitch = !(tm.tmPitchAndFamily & TMPF_FIXED_PITCH); + cache_cost = tm.tmHeight * tm.tmAveCharWidth * 2000; getCMap(); |