summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2012-07-10 10:17:22 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-10 14:23:46 +0200
commite316519c0e0e1c77aa1039d58776631800f29149 (patch)
tree1f7e885e0925e1fdfc00220ada1eac3242f97edd /src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
parentc15e80f6acf3783d8c4ed4852ad1d1708d34c996 (diff)
Get font's underline position in DirectWrite font engine
Fetch the correct underline position for the font along with other metrics. Task-number: QTBUG-22656 Change-Id: I35f6ea15ad18088033a5e7b7b83e2430c1b32a8f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
index 3490ebfc80..48aae703a4 100644
--- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
@@ -242,9 +242,18 @@ void QWindowsFontEngineDirectWrite::collectMetrics()
m_descent = DESIGN_TO_LOGICAL(metrics.descent);
m_xHeight = DESIGN_TO_LOGICAL(metrics.xHeight);
m_lineGap = DESIGN_TO_LOGICAL(metrics.lineGap);
+ m_underlinePosition = DESIGN_TO_LOGICAL(metrics.underlinePosition);
}
}
+QFixed QWindowsFontEngineDirectWrite::underlinePosition() const
+{
+ if (m_underlinePosition > 0)
+ return m_underlinePosition;
+ else
+ return QFontEngine::underlinePosition();
+}
+
QFixed QWindowsFontEngineDirectWrite::lineThickness() const
{
if (m_lineThickness > 0)