Windows DirectWrite: Fix off-by-one in font descent

In cb8445f032 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>
bb10
Eskil Abrahamsen Blomfeldt 2014-10-06 10:45:36 +02:00
parent 848e950252
commit d5db8dbfec
1 changed files with 2 additions and 2 deletions

View File

@ -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