Bug 1170421 - return first font suggested by fontconfig as the default font. r=karlt

This commit is contained in:
John Daggett 2015-06-02 17:20:15 +09:00
parent a1f7e4ef6d
commit 5adb562d62

View File

@ -1145,7 +1145,10 @@ gfxFcPlatformFontList::GetFontList(nsIAtom *aLangGroup,
gfxFontFamily* gfxFontFamily*
gfxFcPlatformFontList::GetDefaultFont(const gfxFontStyle* aStyle) gfxFcPlatformFontList::GetDefaultFont(const gfxFontStyle* aStyle)
{ {
return FindGenericFamily(NS_LITERAL_STRING("serif"), nsGkAtoms::x_western); // Get the default font by using a fake name to retrieve the first
// scalable font that fontconfig suggests for the given language.
return FindGenericFamily(NS_LITERAL_STRING("-moz-default"),
aStyle->language);
} }
gfxFontEntry* gfxFontEntry*