diff options
Diffstat (limited to 'src/gui/text/qfontengine.cpp')
-rw-r--r-- | src/gui/text/qfontengine.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 8aa76f0e40..38d1bf185c 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -465,6 +465,12 @@ void QFontEngine::initializeHeightMetrics() const // Allow OS/2 metrics to override if present processOS2Table(); + + if (!supportsSubPixelPositions()) { + m_ascent = m_ascent.round(); + m_descent = m_descent.round(); + m_leading = m_leading.round(); + } } m_heightMetricsQueried = true; @@ -497,6 +503,7 @@ bool QFontEngine::processOS2Table() const return false; m_ascent = QFixed::fromReal(winAscent * fontDef.pixelSize) / unitsPerEm; m_descent = QFixed::fromReal(winDescent * fontDef.pixelSize) / unitsPerEm; + m_leading = QFixed{}; } return true; |