Skip to content
Permalink
Browse files
Update @font-palette-values override-colors order
https://bugs.webkit.org/show_bug.cgi?id=246565
rdar://problem/101216288

Reviewed by Tim Nguyen.

* LayoutTests/TestExpectations: Removed failure expectation.

* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::addAttributesForCustomFontPalettes): Use CFDictionarySetValue, which overwrites
existing values, resulting in "last one wins".

Canonical link: https://commits.webkit.org/255604@main
  • Loading branch information
darinadler authored and nt1m committed Oct 16, 2022
1 parent 52874c2 commit 322ba50011a5c8ed120e80de0037c95076590111
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
@@ -3757,7 +3757,6 @@ webkit.org/b/206881 imported/w3c/web-platform-tests/css/css-fonts/font-face-weig
webkit.org/b/206881 imported/w3c/web-platform-tests/css/css-fonts/font-face-weight-default-variable.html [ ImageOnlyFailure ]

# Triaged css-fonts failures
webkit.org/b/246565 imported/w3c/web-platform-tests/css/css-fonts/font-palette-21.html [ ImageOnlyFailure ]
webkit.org/b/246564 imported/w3c/web-platform-tests/css/css-fonts/font-synthesis-small-caps-not-applied.html [ ImageOnlyFailure ]

# vert font feature in vertical-text
@@ -540,7 +540,7 @@ static void addAttributesForCustomFontPalettes(CFMutableDictionaryRef attributes
int64_t rawIndex = pair.first; // There is no kCFNumberUIntType.
auto number = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, &rawIndex));
auto colorObject = cachedCGColor(color);
CFDictionaryAddValue(overrideDictionary.get(), number.get(), colorObject.get());
CFDictionarySetValue(overrideDictionary.get(), number.get(), colorObject.get());
}
if (CFDictionaryGetCount(overrideDictionary.get()))
CFDictionaryAddValue(attributes, kCTFontPaletteColorsAttribute, overrideDictionary.get());

0 comments on commit 322ba50

Please sign in to comment.