Bug 1460527 - Add Symbola to the common fallbacks list on Linux, to reduce the probability of falling back to the color-emoji font when emoji-style rendering is not actually wanted. r=m_kato, a=RyanVM
authorJonathan Kew <jkew@mozilla.com>
Wed, 20 Jun 2018 19:47:08 +0100
changeset 473790 42ee22b7ad56
parent 473789 4a7ccfb9d5ed
child 473791 2f2e89cae162
push id1737
push userryanvm@gmail.com
push date2018-07-02 16:05 +0000
treeherdermozilla-release@ced0b5dc71eb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersm_kato, RyanVM
bugs1460527
milestone61.0.1
Bug 1460527 - Add Symbola to the common fallbacks list on Linux, to reduce the probability of falling back to the color-emoji font when emoji-style rendering is not actually wanted. r=m_kato, a=RyanVM
gfx/thebes/gfxPlatformGtk.cpp
--- a/gfx/thebes/gfxPlatformGtk.cpp
+++ b/gfx/thebes/gfxPlatformGtk.cpp
@@ -196,16 +196,17 @@ static const char kFontDejaVuSans[] = "D
 static const char kFontDejaVuSerif[] = "DejaVu Serif";
 static const char kFontFreeSans[] = "FreeSans";
 static const char kFontFreeSerif[] = "FreeSerif";
 static const char kFontTakaoPGothic[] = "TakaoPGothic";
 static const char kFontTwemojiMozilla[] = "Twemoji Mozilla";
 static const char kFontDroidSansFallback[] = "Droid Sans Fallback";
 static const char kFontWenQuanYiMicroHei[] = "WenQuanYi Micro Hei";
 static const char kFontNanumGothic[] = "NanumGothic";
+static const char kFontSymbola[] = "Symbola";
 
 void
 gfxPlatformGtk::GetCommonFallbackFonts(uint32_t aCh, uint32_t aNextCh,
                                        Script aRunScript,
                                        nsTArray<const char*>& aFontList)
 {
     EmojiPresentation emoji = GetEmojiPresentation(aCh);
     if (emoji != EmojiPresentation::TextOnly) {
@@ -216,16 +217,17 @@ gfxPlatformGtk::GetCommonFallbackFonts(u
             aFontList.AppendElement(kFontTwemojiMozilla);
         }
     }
 
     aFontList.AppendElement(kFontDejaVuSerif);
     aFontList.AppendElement(kFontFreeSerif);
     aFontList.AppendElement(kFontDejaVuSans);
     aFontList.AppendElement(kFontFreeSans);
+    aFontList.AppendElement(kFontSymbola);
 
     // add fonts for CJK ranges
     // xxx - this isn't really correct, should use the same CJK font ordering
     // as the pref font code
     if (aCh >= 0x3000 &&
         ((aCh < 0xe000) ||
          (aCh >= 0xf900 && aCh < 0xfff0) ||
          ((aCh >> 16) == 2))) {