| Index: third_party/WebKit/Source/platform/fonts/linux/FontCacheLinux.cpp
|
| diff --git a/third_party/WebKit/Source/platform/fonts/linux/FontCacheLinux.cpp b/third_party/WebKit/Source/platform/fonts/linux/FontCacheLinux.cpp
|
| index 73a82163e164ad8dad6d54c2359c3d087ab487d6..9dad8c839375728a68bd055471b03c0f9713a880 100644
|
| --- a/third_party/WebKit/Source/platform/fonts/linux/FontCacheLinux.cpp
|
| +++ b/third_party/WebKit/Source/platform/fonts/linux/FontCacheLinux.cpp
|
| @@ -50,11 +50,24 @@ void FontCache::getFontForCharacter(UChar32 c, const char* preferredLocale, Font
|
| }
|
|
|
| #if !OS(ANDROID)
|
| -PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(const FontDescription& fontDescription, UChar32 c, const SimpleFontData*)
|
| +PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(
|
| + const FontDescription& fontDescription,
|
| + UChar32 c,
|
| + const SimpleFontData*,
|
| + FontFallbackPriority fallbackPriority)
|
| {
|
| + if (fallbackPriority == FontFallbackPriority::EmojiEmoji) {
|
| + // FIXME crbug.com/591346: We're overriding the fallback character here
|
| + // with the FAMILY emoji in the hope to find a suitable emoji font.
|
| + // This should be improved by supporting fallback for character
|
| + // sequences like DIGIT ONE + COMBINING keycap etc.
|
| + c = familyCharacter;
|
| + }
|
| +
|
| // First try the specified font with standard style & weight.
|
| - if (fontDescription.style() == FontStyleItalic
|
| - || fontDescription.weight() >= FontWeight600) {
|
| + if (fallbackPriority != FontFallbackPriority::EmojiEmoji
|
| + && (fontDescription.style() == FontStyleItalic
|
| + || fontDescription.weight() >= FontWeight600)) {
|
| RefPtr<SimpleFontData> fontData = fallbackOnStandardFontStyle(
|
| fontDescription, c);
|
| if (fontData)
|
|
|