diff --git a/gfx/thebes/gfxFcPlatformFontList.cpp b/gfx/thebes/gfxFcPlatformFontList.cpp --- a/gfx/thebes/gfxFcPlatformFontList.cpp +++ b/gfx/thebes/gfxFcPlatformFontList.cpp @@ -1549,20 +1549,18 @@ gfxFcPlatformFontList::FindGenericFamili NS_ConvertUTF8toUTF16 mappedGenericName(ToCharPtr(mappedGeneric)); gfxFontFamily* genericFamily = gfxPlatformFontList::FindFamily(mappedGenericName); if (genericFamily && !prefFonts->Contains(genericFamily)) { prefFonts->AppendElement(genericFamily); bool foundLang = !fcLang.IsEmpty() && PatternHasLang(font, ToFcChar8Ptr(fcLang.get())); foundFontWithLang = foundFontWithLang || foundLang; - // stop at the first family for which the lang matches (or - // when there is no lang) - if (fcLang.IsEmpty() || - prefFonts->Length() >= limit || foundLang) { + // check to see if the list is full + if (prefFonts->Length() >= limit) { break; } } } } // if no font in the list matches the lang, trim all but the first one if (!prefFonts->IsEmpty() && !foundFontWithLang) {