Chromium Code Reviews| Index: third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm |
| diff --git a/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm b/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm |
| index 0ea373417959f4aa4d374ba9457769928ce2d893..325081a9273fe3d3b6963cbfaef59cebb294dbc4 100644 |
| --- a/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm |
| +++ b/third_party/WebKit/Source/platform/fonts/mac/FontCacheMac.mm |
| @@ -53,6 +53,10 @@ |
| namespace blink { |
| +const char* kColorEmojiFontsMac[] = { "Apple Color Emoji" }; |
|
wkorman
2016/01/25 23:38:16
Is there a useful documentation comment we can add
drott
2016/02/02 17:28:28
Added comments on how to determine/update those, t
|
| +const char* kTextEmojiFontsMac[] = { "Hiragino Kaku Gothic ProN", "Zapf Dingbats", "Apple Symbols" }; |
| +const char* kSymbolsAndMathFontsMac[] = { "Menlo", "Arial Unicode MS" }; |
| + |
| static void invalidateFontCache() |
| { |
| if (!isMainThread()) { |
| @@ -216,4 +220,29 @@ PassOwnPtr<FontPlatformData> FontCache::createFontPlatformData(const FontDescrip |
| return platformData.release(); |
| } |
| + |
| +const Vector<AtomicString> FontCache::platformFontListForFallbackPriority(FontFallbackPriority fallbackPriority) const |
| +{ |
| + Vector<AtomicString> returnVector; |
| + switch (fallbackPriority) { |
| + case FontFallbackPriority::EmojiEmoji: |
| + for (size_t i = 0; i < WTF_ARRAY_LENGTH(kColorEmojiFontsMac); ++i) |
| + returnVector.append(kColorEmojiFontsMac[i]); |
| + break; |
| + case FontFallbackPriority::EmojiText: |
| + for (size_t i = 0; i < WTF_ARRAY_LENGTH(kTextEmojiFontsMac); ++i) |
| + returnVector.append(kTextEmojiFontsMac[i]); |
| + break; |
| + case FontFallbackPriority::Math: |
| + case FontFallbackPriority::Symbols: |
| + for (size_t i = 0; i < WTF_ARRAY_LENGTH(kSymbolsAndMathFontsMac); ++i) |
| + returnVector.append(kSymbolsAndMathFontsMac[i]); |
| + break; |
| + default: |
| + ASSERT_NOT_REACHED(); |
| + } |
| + return returnVector; |
| +} |
| + |
| + |
| } // namespace blink |