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>
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)
void initFontInfo(const QFontDef &request, int dpi, IDWriteFont *font);
QFixed lineThickness() const;
+ QFixed underlinePosition() const;
bool getSfntTableData(uint tag, uchar *buffer, uint *length) const;
QFixed emSquareSize() const;
IDWriteBitmapRenderTarget *m_directWriteBitmapRenderTarget;
QFixed m_lineThickness;
+ QFixed m_underlinePosition;
int m_unitsPerEm;
QFixed m_ascent;
QFixed m_descent;