Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 21695ca97d9908e30f06c30589efe31c61767b7a https://github.com/WebKit/WebKit/commit/21695ca97d9908e30f06c30589efe31c61767b7a Author: Elika Etemad <fantasai.b...@inkedblade.net> Date: 2024-07-29 (Mon, 29 Jul 2024)
Changed paths: M LayoutTests/fast/css/font-face-multiple-faces.html M LayoutTests/fast/text/postscript-bold-expected.html M LayoutTests/fast/text/postscript-bold.html M LayoutTests/platform/glib/fast/css/font-face-multiple-faces-expected.txt M LayoutTests/platform/gtk/fast/css/font-face-multiple-faces-expected.png M LayoutTests/platform/mac/fast/css/font-face-multiple-faces-expected.png M LayoutTests/platform/mac/fast/css/font-face-multiple-faces-expected.txt M Source/WebCore/css/CSSFontFaceSource.cpp M Source/WebCore/platform/graphics/FontCache.cpp M Source/WebCore/platform/graphics/FontCache.h M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h M Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp M Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp M Source/WebCore/platform/graphics/skia/FontCacheSkia.cpp M Source/WebCore/platform/graphics/win/cairo/FontCacheWinCairo.cpp Log Message: ----------- Don't tweak boldness of local @font-face fonts already described as bold https://bugs.webkit.org/show_bug.cgi?id=277170 rdar://130226958 Reviewed by Vitor Roriz. This fixes two problems with lookup of local @font-face fonts described as bold: 1. When using a PostScript name, if the boldness of the font didn't match the descriptor, we would ditch the font and look up a related bold font (which is what we do for font-family lookups) instead of using the font as-is. See changes in platformFontLookupWithFamily() for this error. 2. When disabling font synthesis because the @font-face descriptors already match the request, we fail to plumb that through to local font lookups. See changes in CSSFontFaceSource::font() for this error. * LayoutTests/platform/glib/fast/css/font-face-multiple-faces-expected.txt: Rebaseline. * LayoutTests/platform/gtk/fast/css/font-face-multiple-faces-expected.png: Rebaseline. * LayoutTests/fast/css/font-face-multiple-faces.html: Update to match spec expectations. * LayoutTests/fast/text/postscript-bold-expected.html: More correct references. * LayoutTests/fast/text/postscript-bold.html: Add test for turning off synthesis. * LayoutTests/platform/mac/fast/css/font-face-multiple-faces-expected.png: Match new results. * LayoutTests/platform/mac/fast/css/font-face-multiple-faces-expected.txt: Match new results. * Source/WebCore/css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::load): (WebCore::CSSFontFaceSource::font): * Source/WebCore/platform/graphics/FontCache.cpp: (WebCore::FontCache::cachedFontPlatformData): (WebCore::FontCache::fontForFamily): * Source/WebCore/platform/graphics/FontCache.h: (WebCore::FontCache::fontForFamily): (WebCore::FontCache::cachedFontPlatformData): (WebCore::FontCache::createFontPlatformDataForTesting): * Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp: (WebCore::computeNecessarySynthesis): (WebCore::isAllowlistedFamily): (WebCore::platformFontLookupWithFamily): (WebCore::fontDescriptorWithFamilySpecialCase): (WebCore::fontWithFamily): (WebCore::FontCache::shouldAutoActivateFontIfNeeded): (WebCore::autoActivateFont): (WebCore::lookupFallbackFont): * Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h: (WebCore::computeNecessarySynthesis): * Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp: (WebCore::FontFamilySpecificationCoreText::fontRanges const): * Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp: (WebCore::getFontPropertiesFromPattern): (WebCore::FontCache::createFontPlatformData): * Source/WebCore/platform/graphics/skia/FontCacheSkia.cpp: (WebCore::FontCache::createFontPlatformData): * Source/WebCore/platform/graphics/win/cairo/FontCacheWinCairo.cpp: (WebCore::FontCache::createFontPlatformData): Canonical link: https://commits.webkit.org/281525@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes