Title: [281291] trunk
Revision
281291
Author
mmaxfi...@apple.com
Date
2021-08-19 20:21:05 -0700 (Thu, 19 Aug 2021)

Log Message

[Cocoa] Stop treating the system font as a non-variable font
https://bugs.webkit.org/show_bug.cgi?id=228176

Reviewed by Sam Weinig.

Source/WebCore:

Modern versions of macOS and iOS can treat the system font as a variable font,
and be able to apply weights like "342" instead of just "300" or "400".

Tests: fast/text/variable-system-font-2.html
       fast/text/variable-system-font.html

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::preparePlatformFont):

Source/WTF:

* wtf/PlatformUse.h:

LayoutTests:

Update tests.

* fast/text/resources/Ahem-trak.ttf: Added. This is a font which has a trak table.
* fast/text/trak-optimizeLegibility-expected-mismatch.html: Added.
* fast/text/trak-optimizeLegibility-expected.txt: Removed.
* fast/text/trak-optimizeLegibility.html:
* fast/text/variable-system-font-2-expected-mismatch.html: Added.
* fast/text/variable-system-font-2.html: Added.
* fast/text/variable-system-font-expected-mismatch.html: Added.
* fast/text/variable-system-font.html: Added.
* svg/dom/altGlyph-dom-expected.txt:
* svg/dom/resources/altGlyph-dom.js:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (281290 => 281291)


--- trunk/LayoutTests/ChangeLog	2021-08-20 02:46:43 UTC (rev 281290)
+++ trunk/LayoutTests/ChangeLog	2021-08-20 03:21:05 UTC (rev 281291)
@@ -1,3 +1,23 @@
+2021-08-19  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        [Cocoa] Stop treating the system font as a non-variable font
+        https://bugs.webkit.org/show_bug.cgi?id=228176
+
+        Reviewed by Sam Weinig.
+
+        Update tests.
+
+        * fast/text/resources/Ahem-trak.ttf: Added. This is a font which has a trak table.
+        * fast/text/trak-optimizeLegibility-expected-mismatch.html: Added.
+        * fast/text/trak-optimizeLegibility-expected.txt: Removed.
+        * fast/text/trak-optimizeLegibility.html:
+        * fast/text/variable-system-font-2-expected-mismatch.html: Added.
+        * fast/text/variable-system-font-2.html: Added.
+        * fast/text/variable-system-font-expected-mismatch.html: Added.
+        * fast/text/variable-system-font.html: Added.
+        * svg/dom/altGlyph-dom-expected.txt:
+        * svg/dom/resources/altGlyph-dom.js:
+
 2021-08-19  Eric Hutchison  <ehutchi...@apple.com>
 
         [iOS] 3 imported/w3c/web-platform-tests/css/css-typed-om/ tests are flaky failure.

Modified: trunk/LayoutTests/TestExpectations (281290 => 281291)


--- trunk/LayoutTests/TestExpectations	2021-08-20 02:46:43 UTC (rev 281290)
+++ trunk/LayoutTests/TestExpectations	2021-08-20 03:21:05 UTC (rev 281291)
@@ -5127,3 +5127,6 @@
 http/wpt/crypto/aes-ctr-crash.any.html [ DumpJSConsoleLogInStdErr ]
 imported/w3c/web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_cbc.https.any.html [ DumpJSConsoleLogInStdErr ]
 imported/w3c/web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_ctr.https.any.html [ DumpJSConsoleLogInStdErr ]
+
+webkit.org/b/228176 fast/text/variable-system-font.html [ Pass ImageOnlyFailure ]
+webkit.org/b/228176 fast/text/variable-system-font-2.html [ Pass ImageOnlyFailure ]

Added: trunk/LayoutTests/fast/text/resources/Ahem-trak.ttf (0 => 281291)


--- trunk/LayoutTests/fast/text/resources/Ahem-trak.ttf	                        (rev 0)
+++ trunk/LayoutTests/fast/text/resources/Ahem-trak.ttf	2021-08-20 03:21:05 UTC (rev 281291)
@@ -0,0 +1,44 @@
+\x80@OS/2sf\xF8\xCC`cmap9\x96U\xEE,gasp	8glyf0*	\xFDH\xA8head\xDBP͵ \xF06hhea
+7!($hmtx+!LXloca\xBEԸ7%\xA4.maxp	'\xD4 name\x80\xA9\xAEl'\xF42postc\xA1[#Ztrak\xF6\x89]\x94"\xD6\x90\xBC\x8A\x8F\xBC\x8A\xC52\x80\xAF HW3C @ \xFE\xFF \xFF8 \xC8\xFF\xFC\xFF\xFF   \xF8::&~\xA0\xA1\xA3\xA4\xA5\xA6\xA7\xA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T'\xDA\xF0\xF0\xF8"(0H
+XP$\xA8R\xCC\xF8<48?PT`
+,d\x90)\xA2\xCB\xCF\xD6\xDA	\xF0\xE9	\xD9	\xE1	"\xEF			1	
+X9	$/\x91	R/\xB5	0	0	0	0%The Ahem font belongs to the public domain. In jurisdictions that do not recognize public domain ownership of these files, the following Creative Commons Zero declaration applies: http://labs.creativecommons.org/licenses/zero-waive/1.0/us/legalcodeAhemRegularVersion 1.50 AhemAhemVersion 1.50AhemT
 he Ahem font was developed by Todd Fahrner and Myles C. Maxfield to help test writers develop predictable tests. The units per em is 1000, the advance is 800, a
 nd the descent is 200, thereby making the em square exactly square. The glyphs for most characters is simply a box which fills this square. The codepoints mapped to this full square with a full advance are the following ranges: U+20-U+26, U+28-U+6F, U+71-U+7E, U+A0-U+C8, U+CA-U+FF, U+131, U+152-U+153, U+178, U+192, U+2C6-U+2C7, U+2
 C9, U+2D8-U+2DD, U+394, U+3A5, U+3A7, U+3A9, U+3BC, U+3C0, U+2013-U+2014, U+2018-U+201A, U+201C-U+201E, U+2020-U+2022, U+2026, U+2030, U+2039-U+203A, U+2044, U+2122, 
 U+2126, U+2202, U+2206, U+220F, U+2211-U+2212, U+2219-U+221A, U+221E, U+222B, U+2248, U+2260, U+2264-U+2265, U+22F2, U+25CA, U+3007, U+4E00, U+4E03, U+4E09, U+4E5D, U+4E8C, U+4E94, U+516B, U+516D, U+5341, U+56D7, U+56DB, U+571F, U+6728, U+6C34, U+706B, U+91D1, U+F000-U+F002. The codepoints which are mapped to something else are th
 e following: " " (U+20): No path but full advance; "p" (U+70): Path has 0 ascent but full descent; "\xC9" (U+C9): Path has 0 descent but full ascent; Non
 -breaking space (U+A0): No path but full advance; Zero-width non-breaking space (U+FEFF): No path and 0 advance; En space (U+2002): No path and half advance; Em space (U+2003): No path but full advance; Three-per-em space (U+2004): No path and one third advance; Four-per-em space (U+2005): No path and one quarter advance; Six-per-
 em space (U+2006): No path and one sixth advance; Thin space (U+2009): No path and one fifth advance; Hair space (U+200A): No path and one tenth advance; Zero width s
 pace (U+200B): No path and no advance; Ideographic space (U+3000): No path but full advance; Zero width non-joiner (U+200C): No path and no advance; Zero width joiner (U+200D): No path and no advance; Greek capital letter Chi (U+3A7): Thin horizontal stripe and full advance; (U+6A2A): Thin horizontal stripe and full advance; Greek 
 capital letter Upsilon (U+3A5): Thin vertical stripe and full advance; (U+7EB5): Thin vertical stripe and full advance.http://www.w3c.orghttp://dev.w3.org/CSS/fonts/a
 hem/COPYING
+Normal TrackingThe Ahem font belongs to the public domain. In jurisdictions that do not recognize public domain ownership of these files, the following Creative Commons Zero declaration applies: http://labs.creativecommons.org/licenses/zero-waive/1.0/us/legalcodeAhemRegularVersion 1.50 AhemAhemVersion 1.50AhemThe Ahem font was developed by Todd Fahrner and Myles C. Maxfield to help test writers develop predictable tests. The units per em is 1000, the advance is 800, and the descent is 200, thereby making the em square exactly square. The glyphs for most characters is simply a box which fills this square. The codepoints mapped to this full square with a full advance are the following ranges: U+20-U+26, U+28-U+6F, U+71-U+7E, U+A0-U+C8, U+CA-U+FF, U+131, U+152-U+153, U+178, U+192, U+2C6-U+2C7, U+2C9, U+2D8-U+2DD, U+394, U+3A5, U+3A7, U+3A9, U+3BC, U+3C0, U+2013-U+2014, U+2018-U+201A, U+201C-U+201E, U+2020-U+2022, U+2026, U+2030, U+2039-U+203A, U+2044, U+21
 22, U+2126, U+2
 202, U+2206, U+220F, U+2211-U+2212, U+2219-U+221A, U+221E, U+222B, U+2248, U+2260, U+2264-U+2265, U+22F2, U+25CA, U+3007, U+4E00, U+4E03, U+4E09, U+4E5D, U+4E8C, U+4E94, U+516B, U+516D, U+5341, U+56D7, U+56DB, U+571F, U+6728, U+6C34, U+706B, U+91D1, U+F000-U+F002. The codepoints which are mapped to something else are the following: " " (U+20): No path but full advance; "p" (U+70): Path has 0 ascent but full descent; "\x83" (U+C9): Path has 0 descent but full ascent; Non-breaking space (U+A0): No path but full advance; Zero-width non-breaking space (U+FEFF): No path and 0 advance; En space (U+2002): No path and half advance; Em space (U+2003): No path but full advance; Three-per-em space (U+2004): No path and one third advance; Four-per-em space (U+2005): No path and one quarter advance; Six-per-em space (U+2006): No path and one sixth advance; Thin space (U+2009): No path and one fifth advance; Hair space (U+200A): No path and one tenth advance; Zero wi
 dth space (U+200B): No path and no advance; Ideographic space (U+3000): No path but full advance; Zero width non-joiner (U+200C): No path and no advance; Zero width joiner (U+200D): No path and no advance; Greek capital letter Chi (U+3A7): Thin horizontal stripe and full advance; (U+6A2A): Thin horizontal stripe and full advance; Greek capital letter Upsilon (U+3A5): Thin vertical stripe and full advance; (U+7EB5): Thin vertical stripe and full advance.http://www.w3c.orghttp://dev.w3.org/CSS/fonts/ahem/COPYING
+AhemRegularAhemNormal TrackingThe Ahem font belongs to the public domain. In jurisdictions that do not recognize public domain ownership of these files, the following Creative Commons Zero declaration applies: http://labs.creativecommons.org/licenses/zero-waive/1.0/us/legalcodeAhemRegularVersion 1.50 AhemAhemVersion 1.50AhemThe Ahem font was develope
 d by Todd Fahrner and Myles C. Maxfield to help test writers develop predictable tests. The units per em is 1000, the advance is 800, and the descent is 200, the
 reby making the em square exactly square. The glyphs for most characters is simply a box which fills this square. The codepoints mapped to this full square with a full advance are the following ranges: U+20-U+26, U+28-U+6F, U+71-U+7E, U+A0-U+C8, U+CA-U+FF, U+131, U+152-U+153, U+178, U+192, U+2C6-U+2C7, U+2C9, U+2D8-U+2DD, U+394, U+
 3A5, U+3A7, U+3A9, U+3BC, U+3C0, U+2013-U+2014, U+2018-U+201A, U+201C-U+201E, U+2020-U+2022, U+2026, U+2030, U+2039-U+203A, U+2044, U+2122, U+2126, U+2202, U+2206, U+
 220F, U+2211-U+2212, U+2219-U+221A, U+221E, U+222B, U+2248, U+2260, U+2264-U+2265, U+22F2, U+25CA, U+3007, U+4E00, U+4E03, U+4E09, U+4E5D, U+4E8C, U+4E94, U+516B, U+516D, U+5341, U+56D7, U+56DB, U+571F, U+6728, U+6C34, U+706B, U+91D1, U+F000-U+F002. The codepoints which are mapped to something else are the following: " " (U+20)
 : No path but full advance; "p" (U+70): Path has 0 ascent but full descent; "\xC9" (U+C9): Path has 0 descent but full ascent; Non-breaking space (U+A0): No
  path but full advance; Zero-width non-breaking space (U+FEFF): No path and 0 advance; En space (U+2002): No path and half advance; Em space (U+2003): No path but full advance; Three-per-em space (U+2004): No path and one third advance; Four-per-em space (U+2005): No path and one quarter advance; Six-per-em space (U+2006): No path
  and one sixth advance; Thin space (U+2009): No path and one fifth advance; Hair space (U+200A): No path and one tenth advance; Zero width space (U+200B): No path and
  no advance; Ideographic space (U+3000): No path but full advance; Zero width non-joiner (U+200C): No path and no advance; Zero width joiner (U+200D): No path and no advance; Greek capital letter Chi (U+3A7): Thin horizontal stripe and full advance; (U+6A2A): Thin horizontal stripe and full advance; Greek capital letter Upsilon (U+
 3A5): Thin vertical stripe and full advance; (U+7EB5): Thin vertical stripe and full advance.http://www.w3c.orghttp://dev.w3.org/CSS/fonts/ahem/COPYING
+AhemRegularAhemNormal Tracking\xFF{	+ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x83\x84\x85\x86\x88\x89\x8A\x8B\x8D\x8E\x90\x91\x93\x96\x97\x9D\x9E\xA0\xA1\xA2\xA3\xA4\xA9\xAA\xAC\xAD\xAE\xAF\xB6\xB7\xB8\xBA\xBD\xC3\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\
 xF3\xF4\xF5\xF6\xB0\xB1\xBB\xA6\xA8\x9F\x9B\xB2\xB3\xC4\xB4\xB5\xC5\x82\xC2\x87\xAB\xC6\xBE\xBF\xBC\x8C\x98\x9A\x99\xA5\x92\x9C\x8F\x94\x95\xA7\xB9\xD2\xC0\xC1	
++ !"#$%&'(NULLglyph243glyph204glyph205HTDELuniFEFFuni2002uni2003uni2004uni2005uni2006uni2009uni200Auni200Buni3000	afii61664afii301uni4E00uni4E8Cuni4E09uni56DBuni4E94uni516Duni4E03uni516Buni4E5Duni5341uni3007uni56D7uni706Buni6C34uni6728uni91D1uni571Funi03A7uni6A2Auni03A5uni7EB5 @\xF4
\ No newline at end of file

Added: trunk/LayoutTests/fast/text/trak-optimizeLegibility-expected-mismatch.html (0 => 281291)


--- trunk/LayoutTests/fast/text/trak-optimizeLegibility-expected-mismatch.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/trak-optimizeLegibility-expected-mismatch.html	2021-08-20 03:21:05 UTC (rev 281291)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<style>
+@font-face {
+    font-family: "WebFont";
+    src: url("resources/Ahem-trak.ttf") format("truetype");
+}
+div {
+    font: 64px "WebFont";
+}
+</style>
+</head>
+<body>
+<div>abc</div>
+</body>
+</html>

Deleted: trunk/LayoutTests/fast/text/trak-optimizeLegibility-expected.txt (281290 => 281291)


--- trunk/LayoutTests/fast/text/trak-optimizeLegibility-expected.txt	2021-08-20 02:46:43 UTC (rev 281290)
+++ trunk/LayoutTests/fast/text/trak-optimizeLegibility-expected.txt	2021-08-20 03:21:05 UTC (rev 281291)
@@ -1,12 +0,0 @@
-PASS first.getClientRects().length is 1
-PASS third.getClientRects().length is 1
-FAIL first.getClientRects()[0].right should be within 4 of 346. Was 364.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-This test makes sure that you can opt-in to honoring the 'trak' table by specifying text-rendering: optimizeLegibility. The first and third lines below should have the same width. The middle one can (but doesn't have to) have a different width.
-hamburgefonstiv
-
-hamburgefonstiv
-
-hamburgefonstiv

Modified: trunk/LayoutTests/fast/text/trak-optimizeLegibility.html (281290 => 281291)


--- trunk/LayoutTests/fast/text/trak-optimizeLegibility.html	2021-08-20 02:46:43 UTC (rev 281290)
+++ trunk/LayoutTests/fast/text/trak-optimizeLegibility.html	2021-08-20 03:21:05 UTC (rev 281291)
@@ -1,21 +1,19 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script src=""
+<meta charset="utf-8">
+<style>
+@font-face {
+    font-family: "WebFont";
+    src: url("resources/Ahem-trak.ttf") format("truetype");
+}
+div {
+    font: 64px "WebFont";
+    text-rendering: optimizeLegibility;
+}
+</style>
 </head>
 <body>
-This test makes sure that you can opt-in to honoring the 'trak' table by specifying text-rendering: optimizeLegibility.
-The first and third lines below should have the same width. The middle one can (but doesn't have to) have a different width.
-<p><span id="first" style="font: 100px 'system-ui'; font-weight: 300;">hamburgefonstiv</span></p>
-<p><span id="second" style="font: 100px '.AppleSystemUIFontLight', '.SFNSDisplay-Light', '.SFUIDisplay-Light';">hamburgefonstiv</span></p>
-<p><span id="third" style="font: 100px '.AppleSystemUIFontLight', '.SFNSDisplay-Light', '.SFUIDisplay-Light'; text-rendering: optimizeLegibility;">hamburgefonstiv</span></p>
-<script>
-var first = document.getElementById("first");
-var third = document.getElementById("third");
-shouldBe("first.getClientRects().length", "1");
-shouldBe("third.getClientRects().length", "1");
-shouldBe("first.getClientRects()[0].right", "third.getClientRects()[0].right");
-</script>
-<script src=""
+<div>abc</div>
 </body>
 </html>

Added: trunk/LayoutTests/fast/text/variable-system-font-2-expected-mismatch.html (0 => 281291)


--- trunk/LayoutTests/fast/text/variable-system-font-2-expected-mismatch.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/variable-system-font-2-expected-mismatch.html	2021-08-20 03:21:05 UTC (rev 281291)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div {
+    font: 300 48px system-ui;
+}
+</style>
+</head>
+<body>
+<div>Hello test</div>
+</body>
+</html>

Added: trunk/LayoutTests/fast/text/variable-system-font-2.html (0 => 281291)


--- trunk/LayoutTests/fast/text/variable-system-font-2.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/variable-system-font-2.html	2021-08-20 03:21:05 UTC (rev 281291)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div {
+    font: 351 48px system-ui;
+}
+</style>
+</head>
+<body>
+<div>Hello test</div>
+</body>
+</html>

Added: trunk/LayoutTests/fast/text/variable-system-font-expected-mismatch.html (0 => 281291)


--- trunk/LayoutTests/fast/text/variable-system-font-expected-mismatch.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/variable-system-font-expected-mismatch.html	2021-08-20 03:21:05 UTC (rev 281291)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div {
+    font: 400 48px system-ui;
+}
+</style>
+</head>
+<body>
+<div>Hello test</div>
+</body>
+</html>

Added: trunk/LayoutTests/fast/text/variable-system-font.html (0 => 281291)


--- trunk/LayoutTests/fast/text/variable-system-font.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/variable-system-font.html	2021-08-20 03:21:05 UTC (rev 281291)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div {
+    font: 351 48px system-ui;
+}
+</style>
+</head>
+<body>
+<div>Hello test</div>
+</body>
+</html>

Modified: trunk/LayoutTests/platform/ios/TestExpectations (281290 => 281291)


--- trunk/LayoutTests/platform/ios/TestExpectations	2021-08-20 02:46:43 UTC (rev 281290)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2021-08-20 03:21:05 UTC (rev 281291)
@@ -3482,4 +3482,7 @@
 imported/w3c/web-platform-tests/css/css-typed-om/rotate-by-added-angle.html [ Pass Failure ]
 imported/w3c/web-platform-tests/css/css-typed-om/width-by-max-px-em.html [ Pass Failure ]
 
-webkit.org/b/228200 editing/selection/ios/scrolling-to-focused-element-inside-iframe.html [ Failure ]
\ No newline at end of file
+webkit.org/b/228200 editing/selection/ios/scrolling-to-focused-element-inside-iframe.html [ Failure ]
+
+webkit.org/b/228176 fast/text/variable-system-font.html [ ImageOnlyFailure ]
+webkit.org/b/228176 fast/text/variable-system-font-2.html [ Pass ]

Modified: trunk/LayoutTests/platform/mac/TestExpectations (281290 => 281291)


--- trunk/LayoutTests/platform/mac/TestExpectations	2021-08-20 02:46:43 UTC (rev 281290)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2021-08-20 03:21:05 UTC (rev 281291)
@@ -2328,3 +2328,6 @@
 
 webkit.org/b/228396 fast/speechsynthesis/speech-synthesis-speak-empty-string.html [ Pass Failure ]
 
+webkit.org/b/228176 [ Mojave Catalina BigSur ] fast/text/variable-system-font.html [ ImageOnlyFailure ]
+webkit.org/b/228176 [ Monterey ] fast/text/variable-system-font.html [ Pass ]
+webkit.org/b/228176 [ Mojave Catalina BigSur Monterey ] fast/text/variable-system-font-2.html [ Pass ]

Modified: trunk/LayoutTests/svg/dom/altGlyph-dom-expected.txt (281290 => 281291)


--- trunk/LayoutTests/svg/dom/altGlyph-dom-expected.txt	2021-08-20 02:46:43 UTC (rev 281290)
+++ trunk/LayoutTests/svg/dom/altGlyph-dom-expected.txt	2021-08-20 03:21:05 UTC (rev 281291)
@@ -8,7 +8,6 @@
 PASS altGlyph.namespaceURI is "http://www.w3.org/2000/svg"
 PASS altGlyph.format is "image/svg+xml"
 PASS altGlyph.format = 'x' threw exception NoModificationAllowedError: The object can not be modified..
-FAIL altGlyph.getStartPositionOfChar(0).x should be 0. Was 72.
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/svg/dom/resources/altGlyph-dom.js (281290 => 281291)


--- trunk/LayoutTests/svg/dom/resources/altGlyph-dom.js	2021-08-20 02:46:43 UTC (rev 281290)
+++ trunk/LayoutTests/svg/dom/resources/altGlyph-dom.js	2021-08-20 03:21:05 UTC (rev 281291)
@@ -9,8 +9,4 @@
 shouldBe("altGlyph.namespaceURI", '"http://www.w3.org/2000/svg"');
 shouldBe("altGlyph.format", '"image/svg+xml"');
 shouldThrow("altGlyph.format = 'x'");
-
-shouldBe("altGlyph.getStartPositionOfChar(0).x", '0');
-
-
 successfullyParsed = true;

Modified: trunk/Source/WTF/ChangeLog (281290 => 281291)


--- trunk/Source/WTF/ChangeLog	2021-08-20 02:46:43 UTC (rev 281290)
+++ trunk/Source/WTF/ChangeLog	2021-08-20 03:21:05 UTC (rev 281291)
@@ -1,3 +1,12 @@
+2021-08-19  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        [Cocoa] Stop treating the system font as a non-variable font
+        https://bugs.webkit.org/show_bug.cgi?id=228176
+
+        Reviewed by Sam Weinig.
+
+        * wtf/PlatformUse.h:
+
 2021-08-19  Aditya Keerthi  <akeer...@apple.com>
 
         Remove __has_include guard for _UIDatePickerOverlayPresentation

Modified: trunk/Source/WTF/wtf/PlatformUse.h (281290 => 281291)


--- trunk/Source/WTF/wtf/PlatformUse.h	2021-08-20 02:46:43 UTC (rev 281290)
+++ trunk/Source/WTF/wtf/PlatformUse.h	2021-08-20 03:21:05 UTC (rev 281291)
@@ -312,6 +312,13 @@
 #define USE_CTFONTSHAPEGLYPHS_WORKAROUND 1
 #endif
 
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 120000) \
+    || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED < 150000) \
+    || (PLATFORM(WATCHOS) && !PLATFORM(IOS_FAMILY_SIMULATOR) && __WATCH_OS_VERSION_MIN_REQUIRED < 80000) \
+    || (PLATFORM(APPLETV) && !PLATFORM(IOS_FAMILY_SIMULATOR) && __TV_OS_VERSION_MIN_REQUIRED < 150000)
+#define USE_NON_VARIABLE_SYSTEM_FONT 1
+#endif
+
 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500
 #define USE_LEGACY_CFNETWORK_DOWNLOADS 1
 #endif

Modified: trunk/Source/WebCore/ChangeLog (281290 => 281291)


--- trunk/Source/WebCore/ChangeLog	2021-08-20 02:46:43 UTC (rev 281290)
+++ trunk/Source/WebCore/ChangeLog	2021-08-20 03:21:05 UTC (rev 281291)
@@ -1,3 +1,19 @@
+2021-08-19  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        [Cocoa] Stop treating the system font as a non-variable font
+        https://bugs.webkit.org/show_bug.cgi?id=228176
+
+        Reviewed by Sam Weinig.
+
+        Modern versions of macOS and iOS can treat the system font as a variable font,
+        and be able to apply weights like "342" instead of just "300" or "400".
+
+        Tests: fast/text/variable-system-font-2.html
+               fast/text/variable-system-font.html
+
+        * platform/graphics/cocoa/FontCacheCoreText.cpp:
+        (WebCore::preparePlatformFont):
+
 2021-08-19  Jean-Yves Avenard  <j...@apple.com>
 
         Touchbar not showing time scrubbing

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


--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2021-08-20 02:46:43 UTC (rev 281290)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2021-08-20 03:21:05 UTC (rev 281291)
@@ -335,6 +335,7 @@
     return result;
 }
 
+#if USE(NON_VARIABLE_SYSTEM_FONT)
 static inline bool fontIsSystemFont(CTFontRef font)
 {
     if (isSystemFont(font))
@@ -343,6 +344,7 @@
     auto name = adoptCF(CTFontCopyPostScriptName(font));
     return fontNameIsSystemFont(name.get());
 }
+#endif
 
 // These values were calculated by performing a linear regression on the CSS weights/widths/slopes and Core Text weights/widths/slopes of San Francisco.
 // FIXME: <rdar://problem/31312602> Get the real values from Core Text.
@@ -505,7 +507,11 @@
 
     // Step 2: font-weight, font-stretch, and font-style
     // The system font is somewhat magical. Don't mess with its variations.
-    if (applyWeightWidthSlopeVariations && !fontIsSystemFont(originalFont)) {
+    if (applyWeightWidthSlopeVariations
+#if USE(NON_VARIABLE_SYSTEM_FONT)
+        && !fontIsSystemFont(originalFont)
+#endif
+    ) {
         float weight = fontSelectionRequest.weight;
         float width = fontSelectionRequest.width;
         float slope = fontSelectionRequest.slope.value_or(normalItalicValue());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to