diff --git a/gfx/thebes/gfxFcPlatformFontList.cpp b/gfx/thebes/gfxFcPlatformFontList.cpp index a015845cde9..003dce59d96 100644 --- a/gfx/thebes/gfxFcPlatformFontList.cpp +++ b/gfx/thebes/gfxFcPlatformFontList.cpp @@ -1145,7 +1145,10 @@ gfxFcPlatformFontList::GetFontList(nsIAtom *aLangGroup, gfxFontFamily* 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*