Title: [266665] trunk
Revision
266665
Author
[email protected]
Date
2020-09-05 10:57:00 -0700 (Sat, 05 Sep 2020)

Log Message

[macOS] Don't apply synthetic bold or italics to emoji
https://bugs.webkit.org/show_bug.cgi?id=215686

Reviewed by Darin Adler.

Source/WebCore:

Italicized emoji are one of the most hideous things I've ever seen.

This unifies the behavior between macOS and iOS.

Test: fast/text/emoji-synthesis.html

* WebCore.xcodeproj/xcshareddata/xcschemes/WebCore.xcscheme:
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::computeNecessarySynthesis):

LayoutTests:

* fast/text/emoji-synthesis-expected.html: Added.
* fast/text/emoji-synthesis.html: Added.
* platform/win/TestExpectations:
* platform/mac/fast/text/fallback-traits-fixup-expected.txt:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (266664 => 266665)


--- trunk/LayoutTests/ChangeLog	2020-09-05 17:55:35 UTC (rev 266664)
+++ trunk/LayoutTests/ChangeLog	2020-09-05 17:57:00 UTC (rev 266665)
@@ -1,3 +1,15 @@
+2020-09-05  Myles C. Maxfield  <[email protected]>
+
+        [macOS] Don't apply synthetic bold or italics to emoji
+        https://bugs.webkit.org/show_bug.cgi?id=215686
+
+        Reviewed by Darin Adler.
+
+        * fast/text/emoji-synthesis-expected.html: Added.
+        * fast/text/emoji-synthesis.html: Added.
+        * platform/win/TestExpectations:
+        * platform/mac/fast/text/fallback-traits-fixup-expected.txt:
+
 2020-09-05  Darin Adler  <[email protected]>
 
         CSS revert should serialize as "revert", not "Revert"

Added: trunk/LayoutTests/fast/text/emoji-synthesis-expected.html (0 => 266665)


--- trunk/LayoutTests/fast/text/emoji-synthesis-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/emoji-synthesis-expected.html	2020-09-05 17:57:00 UTC (rev 266665)
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+</head>
+<body>
+<div>🤡</div>
+<div>🤡</div>
+<div>🤡</div>
+</body>
+</html>
+

Added: trunk/LayoutTests/fast/text/emoji-synthesis.html (0 => 266665)


--- trunk/LayoutTests/fast/text/emoji-synthesis.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/emoji-synthesis.html	2020-09-05 17:57:00 UTC (rev 266665)
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+</head>
+<body>
+<div>🤡</div>
+<div style="font-weight: bold;">🤡</div>
+<div style="font-style: italic;">🤡</div>
+</body>
+</html>
+

Modified: trunk/LayoutTests/platform/mac/fast/text/fallback-traits-fixup-expected.txt (266664 => 266665)


--- trunk/LayoutTests/platform/mac/fast/text/fallback-traits-fixup-expected.txt	2020-09-05 17:55:35 UTC (rev 266664)
+++ trunk/LayoutTests/platform/mac/fast/text/fallback-traits-fixup-expected.txt	2020-09-05 17:57:00 UTC (rev 266665)
@@ -25,7 +25,7 @@
       RenderBlock {P} at (0,92) size 784x42
         RenderText {#text} at (0,18) size 140x18
           text run at (0,18) width 140: "Another black circle: "
-        RenderInline {SPAN} at (0,0) size 34x37
-          RenderText {#text} at (139,3) size 34x37
-            text run at (139,3) width 34: "\x{26AB}"
+        RenderInline {SPAN} at (0,0) size 33x37
+          RenderText {#text} at (139,3) size 33x37
+            text run at (139,3) width 33: "\x{26AB}"
         RenderText {#text} at (0,0) size 0x0

Modified: trunk/LayoutTests/platform/win/TestExpectations (266664 => 266665)


--- trunk/LayoutTests/platform/win/TestExpectations	2020-09-05 17:55:35 UTC (rev 266664)
+++ trunk/LayoutTests/platform/win/TestExpectations	2020-09-05 17:57:00 UTC (rev 266665)
@@ -4559,3 +4559,6 @@
 
 webkit.org/b/216036 http/tests/navigation/page-cache-video.html [ Pass Crash ]
 webkit.org/b/216036 webanimations/animation-page-cache.html [ Pass Timeout ]
+
+# Emoji synthesis is only currently disabled on Cocoa platforms
+fast/text/emoji-synthesis.html [ ImageOnlyFailure ]

Modified: trunk/Source/WebCore/ChangeLog (266664 => 266665)


--- trunk/Source/WebCore/ChangeLog	2020-09-05 17:55:35 UTC (rev 266664)
+++ trunk/Source/WebCore/ChangeLog	2020-09-05 17:57:00 UTC (rev 266665)
@@ -1,3 +1,20 @@
+2020-09-05  Myles C. Maxfield  <[email protected]>
+
+        [macOS] Don't apply synthetic bold or italics to emoji
+        https://bugs.webkit.org/show_bug.cgi?id=215686
+
+        Reviewed by Darin Adler.
+
+        Italicized emoji are one of the most hideous things I've ever seen.
+
+        This unifies the behavior between macOS and iOS.
+
+        Test: fast/text/emoji-synthesis.html
+
+        * WebCore.xcodeproj/xcshareddata/xcschemes/WebCore.xcscheme:
+        * platform/graphics/cocoa/FontCacheCoreText.cpp:
+        (WebCore::computeNecessarySynthesis):
+
 2020-09-04  Simon Fraser  <[email protected]>
 
         REGRESSION (r260571): Scrolling on weather.com in Safari causes the gradient background to flicker (fixed backgrounds)

Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (266664 => 266665)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2020-09-05 17:55:35 UTC (rev 266664)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2020-09-05 17:57:00 UTC (rev 266665)
@@ -814,10 +814,8 @@
 
 SynthesisPair computeNecessarySynthesis(CTFontRef font, const FontDescription& fontDescription, bool isPlatformFont)
 {
-#if PLATFORM(IOS_FAMILY)
     if (CTFontIsAppleColorEmoji(font))
         return SynthesisPair(false, false);
-#endif
 
     if (isPlatformFont)
         return SynthesisPair(false, false);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to