Title: [224573] releases/WebKitGTK/webkit-2.18/Source/WebCore
- Revision
- 224573
- Author
- [email protected]
- Date
- 2017-11-08 00:47:20 -0800 (Wed, 08 Nov 2017)
Log Message
Merge r221724 - [GTK] Bring back line height rounding when computing font metrics
https://bugs.webkit.org/show_bug.cgi?id=176497
Reviewed by Žan Doberšek.
In r221670 we changed the way we get the metrics to avoid rounding that was causing a negative line gap to be
computed. Since the font metrics value is indeed a float value, we also removed the rounding when setting the
line height. However, this caused some test failures because now we report non integer line heights.
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::Font::platformInit):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog (224572 => 224573)
--- releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog 2017-11-08 08:47:14 UTC (rev 224572)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog 2017-11-08 08:47:20 UTC (rev 224573)
@@ -1,3 +1,17 @@
+2017-09-07 Carlos Garcia Campos <[email protected]>
+
+ [GTK] Bring back line height rounding when computing font metrics
+ https://bugs.webkit.org/show_bug.cgi?id=176497
+
+ Reviewed by Žan Doberšek.
+
+ In r221670 we changed the way we get the metrics to avoid rounding that was causing a negative line gap to be
+ computed. Since the font metrics value is indeed a float value, we also removed the rounding when setting the
+ line height. However, this caused some test failures because now we report non integer line heights.
+
+ * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
+ (WebCore::Font::platformInit):
+
2017-09-06 Dominik Röttsches <[email protected]>
[GTK] Bump freetype version to 2.8.0
Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp (224572 => 224573)
--- releases/WebKitGTK/webkit-2.18/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp 2017-11-08 08:47:14 UTC (rev 224572)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp 2017-11-08 08:47:20 UTC (rev 224573)
@@ -106,7 +106,7 @@
m_fontMetrics.setAscent(ascent);
m_fontMetrics.setDescent(descent);
m_fontMetrics.setCapHeight(capHeight);
- m_fontMetrics.setLineSpacing(ascent + descent + lineGap);
+ m_fontMetrics.setLineSpacing(lroundf(ascent) + lroundf(descent) + lroundf(lineGap));
m_fontMetrics.setLineGap(lineGap);
cairo_text_extents_t textExtents;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes