diff --git a/gfx/src/gtk/nsFontMetricsXft.cpp b/gfx/src/gtk/nsFontMetricsXft.cpp index a8599faaada..c9348d1a652 100644 --- a/gfx/src/gtk/nsFontMetricsXft.cpp +++ b/gfx/src/gtk/nsFontMetricsXft.cpp @@ -1141,7 +1141,7 @@ nsFontMetricsXft::SetupFCPattern(void) // If there's a generic add a pref for the generic if there's one // set. - if (mGenericFont) { + if (mGenericFont && (mFontList.Count()==1)) { nsCString name; name += "font.name."; name += mGenericFont->get(); @@ -1176,7 +1176,7 @@ nsFontMetricsXft::SetupFCPattern(void) } // Add the generic if there is one. - if (mGenericFont) + if (mGenericFont && (mFontList.Count()==1)) AddFFRE(mPattern, mGenericFont, PR_FALSE); if (PR_LOG_TEST(gXftFontLoad, PR_LOG_DEBUG)) {