Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f30738ce1fc85db4741fd9ab8ed429bbb9b309fa
      
https://github.com/WebKit/WebKit/commit/f30738ce1fc85db4741fd9ab8ed429bbb9b309fa
  Author: Carlos Garcia Campos <[email protected]>
  Date:   2024-10-21 (Mon, 21 Oct 2024)

  Changed paths:
    M Source/WebCore/platform/graphics/skia/FontCacheSkia.cpp

  Log Message:
  -----------
  [Skia] Crash in WebCore::FontCache::lastResortFallbackFont
https://bugs.webkit.org/show_bug.cgi?id=281375

Reviewed by Michael Catanzaro.

Skia always does strong matching when querying fonts by its family name
to not break the CSS font fallback mechanism, but when trying to get the
last resort fallback font we just want to make sure we return a valid
font even if the match is not strong. So, when "serif" doesn't return a
valid font we try again with a null family name, to tell Skia not to do
a string matching. And if we still get a null font, which probably means
there's a problem with fontconfig installation or configuration, we can
just create and empty SkTypeface to make sure we don't crash.

* Source/WebCore/platform/graphics/skia/FontCacheSkia.cpp:
(WebCore::FontCache::lastResortFallbackFont):

Canonical link: https://commits.webkit.org/285505@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to