Title: [265648] trunk/Source/WebCore
- Revision
- 265648
- Author
- [email protected]
- Date
- 2020-08-13 22:59:19 -0700 (Thu, 13 Aug 2020)
Log Message
REGRESSION(r254506): [Freetype] Spektra variable font does not work properly
https://bugs.webkit.org/show_bug.cgi?id=215214
<rdar://problem/66984524>
Reviewed by Adrian Perez de Castro.
This regressed in r254506, when a font smoothing mode is passed to drawGlyphsToContext() a new cairo font
options is set, using the default font options and changing the antialiasing. This means the font options from
the font (the ones containing the variation settings) set in the context by cairo_set_scaled_font() are
lost. We should copy the scaled font options instead, then set the antialiasing and apply them.
* platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::drawGlyphsToContext): Use cairo_scaled_font_get_font_options() instead of getDefaultCairoFontOptions().
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (265647 => 265648)
--- trunk/Source/WebCore/ChangeLog 2020-08-14 05:57:42 UTC (rev 265647)
+++ trunk/Source/WebCore/ChangeLog 2020-08-14 05:59:19 UTC (rev 265648)
@@ -1,5 +1,21 @@
2020-08-13 Carlos Garcia Campos <[email protected]>
+ REGRESSION(r254506): [Freetype] Spektra variable font does not work properly
+ https://bugs.webkit.org/show_bug.cgi?id=215214
+ <rdar://problem/66984524>
+
+ Reviewed by Adrian Perez de Castro.
+
+ This regressed in r254506, when a font smoothing mode is passed to drawGlyphsToContext() a new cairo font
+ options is set, using the default font options and changing the antialiasing. This means the font options from
+ the font (the ones containing the variation settings) set in the context by cairo_set_scaled_font() are
+ lost. We should copy the scaled font options instead, then set the antialiasing and apply them.
+
+ * platform/graphics/cairo/CairoOperations.cpp:
+ (WebCore::Cairo::drawGlyphsToContext): Use cairo_scaled_font_get_font_options() instead of getDefaultCairoFontOptions().
+
+2020-08-13 Carlos Garcia Campos <[email protected]>
+
Crash in WebCore::StyledMarkupAccumulator::traverseNodesForSerialization
https://bugs.webkit.org/show_bug.cgi?id=199224
Modified: trunk/Source/WebCore/platform/graphics/cairo/CairoOperations.cpp (265647 => 265648)
--- trunk/Source/WebCore/platform/graphics/cairo/CairoOperations.cpp 2020-08-14 05:57:42 UTC (rev 265647)
+++ trunk/Source/WebCore/platform/graphics/cairo/CairoOperations.cpp 2020-08-14 05:59:19 UTC (rev 265648)
@@ -286,7 +286,9 @@
// The scaled font defaults to FontSmoothingMode::AutoSmoothing. Only override antialiasing settings if its not auto.
if (fontSmoothingMode != FontSmoothingMode::AutoSmoothing) {
- CairoUniquePtr<cairo_font_options_t> fontOptionsSmoothing(cairo_font_options_copy(getDefaultCairoFontOptions()));
+ CairoUniquePtr<cairo_font_options_t> fontOptionsSmoothing(cairo_font_options_create());
+ cairo_scaled_font_get_font_options(scaledFont, fontOptionsSmoothing.get());
+
switch (fontSmoothingMode) {
case FontSmoothingMode::Antialiased:
// Don't use CAIRO_ANTIALIAS_GRAY in Windows. It is mapped to ANTIALIASED_QUALITY which looks jaggy and faint.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes