Title: [277243] trunk/Source/WebCore
Revision
277243
Author
[email protected]
Date
2021-05-09 00:17:30 -0700 (Sun, 09 May 2021)

Log Message

[Cocoa] Unify last resort fallback font between all Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=225569

Reviewed by Darin Adler.

Just remove an unnecessary #if.

Covered by existing tests.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (277242 => 277243)


--- trunk/Source/WebCore/ChangeLog	2021-05-09 04:53:33 UTC (rev 277242)
+++ trunk/Source/WebCore/ChangeLog	2021-05-09 07:17:30 UTC (rev 277243)
@@ -1,3 +1,17 @@
+2021-05-09  Myles C. Maxfield  <[email protected]>
+
+        [Cocoa] Unify last resort fallback font between all Cocoa ports
+        https://bugs.webkit.org/show_bug.cgi?id=225569
+
+        Reviewed by Darin Adler.
+
+        Just remove an unnecessary #if.
+
+        Covered by existing tests.
+
+        * platform/graphics/cocoa/FontCacheCoreText.cpp:
+        (WebCore::FontCache::lastResortFallbackFont):
+
 2021-05-08  Peng Liu  <[email protected]>
 
         [GPUP] A small video element enters fullscreen with strange animations

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


--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2021-05-09 04:53:33 UTC (rev 277242)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2021-05-09 07:17:30 UTC (rev 277243)
@@ -1538,15 +1538,8 @@
         return *result;
 
     // LastResort is guaranteed to be non-null.
-// FIXME: Likely we can remove this special case for watchOS and tvOS.
-#if !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
     auto fontDescriptor = adoptCF(CTFontDescriptorCreateLastResort());
     auto font = adoptCF(CTFontCreateWithFontDescriptor(fontDescriptor.get(), fontDescription.computedPixelSize(), nullptr));
-#else
-    // Even if Helvetica doesn't exist, CTFontCreateWithName will return
-    // a thin wrapper around a GraphicsFont which represents LastResort.
-    auto font = adoptCF(CTFontCreateWithName(CFSTR("Helvetica"), fontDescription.computedPixelSize(), nullptr));
-#endif
     auto [syntheticBold, syntheticOblique] = computeNecessarySynthesis(font.get(), fontDescription).boldObliquePair();
     FontPlatformData platformData(font.get(), fontDescription.computedPixelSize(), syntheticBold, syntheticOblique, fontDescription.orientation(), fontDescription.widthVariant(), fontDescription.textRenderingMode());
     return fontForPlatformData(platformData);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to