From d5db8dbfec198496967b8cb034ca5846e152db95 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 6 Oct 2014 10:45:36 +0200 Subject: 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 --- src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp') 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 -- cgit v1.2.3