| Index: third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp
|
| diff --git a/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp b/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp
|
| index 8298ac285da0f0602df24ae1ffa47193a4b476d5..2307530e26bc024ce0babe8326e7dfbd091e8093 100644
|
| --- a/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp
|
| +++ b/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp
|
| @@ -37,10 +37,13 @@
|
| #include "platform/fonts/FontCache.h"
|
| #include "platform/fonts/FontPlatformData.h"
|
| #include "platform/fonts/WebFontDecoder.h"
|
| +#if OS(MACOSX)
|
| +#include "platform/fonts/mac/CoreTextVariationsSupport.h"
|
| +#endif
|
| #include "platform/fonts/opentype/FontSettings.h"
|
| #include "third_party/skia/include/core/SkStream.h"
|
| #include "third_party/skia/include/core/SkTypeface.h"
|
| -#if OS(WIN)
|
| +#if OS(WIN) || OS(MACOSX)
|
| #include "third_party/skia/include/ports/SkFontMgr_empty.h"
|
| #endif
|
| #include "platform/wtf/PtrUtil.h"
|
| @@ -74,6 +77,12 @@ FontPlatformData FontCustomPlatformData::GetFontPlatformData(
|
| if (variation_settings && variation_settings->size() < UINT16_MAX) {
|
| #if OS(WIN)
|
| sk_sp<SkFontMgr> fm(SkFontMgr_New_Custom_Empty());
|
| +#elif OS(MACOSX)
|
| + sk_sp<SkFontMgr> fm;
|
| + if (CoreTextVersionSupportsVariations())
|
| + fm = SkFontMgr::RefDefault();
|
| + else
|
| + fm = SkFontMgr_New_Custom_Empty();
|
| #else
|
| sk_sp<SkFontMgr> fm(SkFontMgr::RefDefault());
|
| #endif
|
|
|