Bug 1330389 - CoreText font fallback on macOS may choose one of the 'hidden' system fonts, so we need to check that list when looking for the corresponding gfxFontFamily. r=jrmuizel
authorJonathan Kew <jkew@mozilla.com>
Wed, 18 Jan 2017 20:38:05 +0000
changeset 375045 60eddecfd12de63fc795515d24977b43e5148619
parent 375044 02fc9d9b46a58d20270c5dba699e3eef56370b80
child 375046 782f2a6bf284974ae03d85ce269b9a802589b045
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1330389
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1330389 - CoreText font fallback on macOS may choose one of the 'hidden' system fonts, so we need to check that list when looking for the corresponding gfxFontFamily. r=jrmuizel
gfx/thebes/gfxMacPlatformFontList.mm
--- a/gfx/thebes/gfxMacPlatformFontList.mm
+++ b/gfx/thebes/gfxMacPlatformFontList.mm
@@ -1059,17 +1059,17 @@ gfxMacPlatformFontList::GlobalFontFallba
             buffer.SetLength(familyNameLen+1);
             ::CFStringGetCharacters(familyNameRef, ::CFRangeMake(0, familyNameLen),
                                     buffer.Elements());
             buffer[familyNameLen] = 0;
             nsDependentString familyNameString(reinterpret_cast<char16_t*>(buffer.Elements()), familyNameLen);
 
             bool needsBold;  // ignored in the system fallback case
 
-            gfxFontFamily *family = FindFamily(familyNameString);
+            gfxFontFamily *family = FindSystemFontFamily(familyNameString);
             if (family) {
                 fontEntry = family->FindFontForStyle(*aMatchStyle, needsBold);
                 if (fontEntry) {
                     if (fontEntry->HasCharacter(aCh)) {
                         *aMatchedFamily = family;
                     } else {
                         fontEntry = nullptr;
                         cantUseFallbackFont = true;