diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2014-10-06 10:45:36 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2014-10-06 14:27:51 +0200 |
commit | d5db8dbfec198496967b8cb034ca5846e152db95 (patch) | |
tree | 6c6f513745e8c61819157c9892b2f91a4ee72a00 | |
parent | 848e95025297f8f56443ea7b22a1ddca1cc63cd8 (diff) |
Windows DirectWrite: Fix off-by-one in font descent
In cb8445f0323b0eefbb04f1d8adad81a00b53abd8 we removed the historical
+1 in font heights and the corresponding -1 in the descent measurement
for all font engines. But the change to the direct write font engine
was lost at some point during the transition to QPA, where we seem
to have integrated an older version of the source file.
[ChangeLog][Windows][Fonts] Fix off-by-one in font descent when using
the DirectWrite font engine.
Task-number: QTBUG-41783
Change-Id: Iffa24b5f2b4f6cc3a1f0034fdff63a1ee62ea9f7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
-rw-r--r-- | src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp index 0041a07fb0..648f68bb19 100644 --- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp +++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp @@ -457,8 +457,8 @@ QFixed QWindowsFontEngineDirectWrite::ascent() const QFixed QWindowsFontEngineDirectWrite::descent() const { return fontDef.styleStrategy & QFont::ForceIntegerMetrics - ? (m_descent - 1).round() - : (m_descent - 1); + ? m_descent.round() + : m_descent; } QFixed QWindowsFontEngineDirectWrite::leading() const |