bug 969504 - avoid using Segoe UI Light or Semibold for U+25B6 due to bad glyph on Win7. r=jdaggett
authorJonathan Kew <jkew@mozilla.com>
Mon, 17 Feb 2014 11:23:57 +0000
changeset 169461 4e6633cbb6975e60ceb0beed6f2020317517be0a
parent 169460 b431599b4e684185fec5b58bc5182025d63ef965
child 169462 1cbbc597b7b5385b78a0f97cb2e2da5a29d8c1cc
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersjdaggett
bugs969504
milestone30.0a1
bug 969504 - avoid using Segoe UI Light or Semibold for U+25B6 due to bad glyph on Win7. r=jdaggett
gfx/thebes/gfxDWriteFontList.cpp
--- a/gfx/thebes/gfxDWriteFontList.cpp
+++ b/gfx/thebes/gfxDWriteFontList.cpp
@@ -538,16 +538,24 @@ gfxDWriteFontEntry::ReadCMAP(FontInfoDat
                                         unicodeFont, symbolFont);
         } else {
             rv = NS_ERROR_NOT_AVAILABLE;
         }
     }
 
     mHasCmapTable = NS_SUCCEEDED(rv);
     if (mHasCmapTable) {
+        // Bug 969504: exclude U+25B6 from Segoe UI family, because it's used
+        // by sites to represent a "Play" icon, but the glyph in Segoe UI Light
+        // and Semibold on Windows 7 is too thin. (Ditto for leftward U+25C0.)
+        // Fallback to Segoe UI Symbol is preferred.
+        if (FamilyName().EqualsLiteral("Segoe UI")) {
+            charmap->clear(0x25b6);
+            charmap->clear(0x25c0);
+        }
         gfxPlatformFontList *pfl = gfxPlatformFontList::PlatformFontList();
         mCharacterMap = pfl->FindCharMap(charmap);
     } else {
         // if error occurred, initialize to null cmap
         mCharacterMap = new gfxCharacterMap();
     }
 
 #ifdef PR_LOGGING