[webkit-changes] [WebKit/WebKit] 9de3b4: [Cocoa] font-family:system-ui results in totally g...
Myles C. Maxfield
noreply at github.com
Wed Aug 30 12:48:06 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9de3b434f4b0c6b0f0f166df0a180963080ba045
https://github.com/WebKit/WebKit/commit/9de3b434f4b0c6b0f0f166df0a180963080ba045
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-08-30 (Wed, 30 Aug 2023)
Changed paths:
M Source/WebCore/platform/graphics/coretext/FontPlatformDataCoreText.cpp
Log Message:
-----------
[Cocoa] font-family:system-ui results in totally garbled text when the user has a user-installed system font
https://bugs.webkit.org/show_bug.cgi?id=260886
rdar://113706205
Reviewed by Cameron McCormack.
When we serialize fonts across IPC, we aren't precise enough in our description of the system font.
This was causing the web process to use the real system font, while the GPU process uses the user-
installed system font.
This patch does 2 things to mitigate this:
1. Refuses to use a font if its location on disk ("reference URL") is different than the desired
location on disk
2. If we end up in this situation where we refuse to use a font, fall back to trying to create it
from the file on-disk rather than the higher-level font descriptor
This patch is untestable, as it requires a system-wide installation of a user-installed system font
that shadows the real system font.
* Source/WebCore/platform/graphics/coretext/FontPlatformDataCoreText.cpp:
(WebCore::findFontDescriptor):
(WebCore::createCTFont):
Canonical link: https://commits.webkit.org/267463@main
More information about the webkit-changes
mailing list