diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp b/Source/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp index b1e7082..4ded761 100644 --- a/Source/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp +++ b/Source/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp @@ -48,11 +48,11 @@ void SimpleFontData::platformInit() font_height height; font->GetHeight(&height); - m_ascent = static_cast<int>(height.ascent); - m_descent = static_cast<int>(height.descent); - m_lineSpacing = m_ascent + m_descent; - m_xHeight = height.ascent * 0.56f; // Hack taken from the win port. - m_lineGap = height.leading; + m_fontMetrics.setAscent(height.ascent); + m_fontMetrics.setDescent(height.descent); + m_fontMetrics.setXHeight(height.ascent * 0.56f); // Hack taken from the win port. + m_fontMetrics.setLineGap(height.leading); + m_fontMetrics.setLineSpacing(lroundf(height.ascent) + lroundf(height.descent) + lroundf(height.leading)); } void SimpleFontData::platformCharWidthInit() |