Bug 1882947 - Adjust SkTypeface_mac_ct.cpp after bug 1858347. r=gfx-reviewers,lsalzman

Differential Revision: https://phabricator.services.mozilla.com/D203223
This commit is contained in:
Mike Hommey 2024-03-01 19:31:43 +00:00
Родитель 1dd8e14695
Коммит aaca58bb25
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -64,7 +64,7 @@
#include <string.h>
#include <memory>
#ifdef MOZ_SKIA
#if defined(MOZ_SKIA) && defined(XP_MACOSX)
#include "nsCocoaFeatures.h"
#endif
@ -290,7 +290,7 @@ SkUniqueCFRef<CTFontRef> SkCTFontCreateExactCopy(CTFontRef baseFont, CGFloat tex
auto ctFont = SkUniqueCFRef<CTFontRef>(
CTFontCreateWithGraphicsFont(baseCGFont.get(), textSize, nullptr, desc.get()));
if (variations) {
#ifdef MOZ_SKIA
#if defined(MOZ_SKIA) && defined(XP_MACOSX)
if (nsCocoaFeatures::OnVenturaOrLater()) {
// On recent macOS versions, CTFontCreateWithGraphicsFont fails to apply
// the variations from the descriptor, so to get the correct values we use