Skip to content

Instantly share code, notes, and snippets.

@drott
Created January 14, 2013 15:44
Show Gist options
  • Save drott/4530904 to your computer and use it in GitHub Desktop.
Save drott/4530904 to your computer and use it in GitHub Desktop.
--- a/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp
+++ b/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp
@@ -65,8 +65,12 @@ void SimpleFontData::platformInit()
m_fontMetrics.setAscent(ascent);
m_fontMetrics.setDescent(descent);
+#if !PLATFORM(EFL)
// Match CoreGraphics metrics.
m_fontMetrics.setLineSpacing(lroundf(ascent) + lroundf(descent) + lroundf(lineGap));
+#else
+ m_fontMetrics.setLineSpacing(ascent + descent + lineGap);
+#endif
m_fontMetrics.setLineGap(lineGap);
cairo_scaled_font_text_extents(m_platformData.scaledFont(), "x", &text_extents);
@@ -74,7 +78,7 @@ void SimpleFontData::platformInit()
cairo_scaled_font_text_extents(m_platformData.scaledFont(), " ", &text_extents);
m_spaceWidth = narrowPrecisionToFloat(text_extents.x_advance);
-
+
m_syntheticBoldOffset = m_platformData.syntheticBold() ? 1.0f : 0.f;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment