diff --git a/gfx/thebes/public/gfxFont.h b/gfx/thebes/public/gfxFont.h index 5af3471d916..1b8f7883171 100644 --- a/gfx/thebes/public/gfxFont.h +++ b/gfx/thebes/public/gfxFont.h @@ -1469,10 +1469,6 @@ protected: FontCreationCallback fc, void *closure); - /* this will call back fc with the a generic font based on the style's langgroup */ - void FindGenericFontFromStyle(PRBool aResolveFontName, - FontCreationCallback fc, void *closure); - static PRBool FontResolverProc(const nsAString& aName, void *aClosure); }; #endif diff --git a/gfx/thebes/src/gfxFont.cpp b/gfx/thebes/src/gfxFont.cpp index 5af50cb8b30..dfdce9b37df 100644 --- a/gfx/thebes/src/gfxFont.cpp +++ b/gfx/thebes/src/gfxFont.cpp @@ -810,48 +810,6 @@ gfxFontGroup::FontResolverProc(const nsAString& aName, void *aClosure) return (data->mCallback)(aName, data->mGenericFamily, data->mClosure); } -void -gfxFontGroup::FindGenericFontFromStyle(PRBool aResolveFontName, - FontCreationCallback fc, - void *closure) -{ - nsCOMPtr prefs(do_GetService(NS_PREF_CONTRACTID)); - if (!prefs) - return; - - nsCAutoString prefName; - nsXPIDLString genericName; - nsXPIDLString familyName; - - // add the default font to the end of the list - prefName.AssignLiteral("font.default."); - prefName.Append(mStyle.langGroup); - nsresult rv = prefs->CopyUnicharPref(prefName.get(), getter_Copies(genericName)); - if (NS_SUCCEEDED(rv)) { - prefName.AssignLiteral("font.name."); - prefName.Append(NS_LossyConvertUTF16toASCII(genericName)); - prefName.AppendLiteral("."); - prefName.Append(mStyle.langGroup); - - rv = prefs->CopyUnicharPref(prefName.get(), getter_Copies(familyName)); - if (NS_SUCCEEDED(rv)) { - ForEachFontInternal(familyName, mStyle.langGroup, - PR_FALSE, aResolveFontName, fc, closure); - } - - prefName.AssignLiteral("font.name-list."); - prefName.Append(NS_LossyConvertUTF16toASCII(genericName)); - prefName.AppendLiteral("."); - prefName.Append(mStyle.langGroup); - - rv = prefs->CopyUnicharPref(prefName.get(), getter_Copies(familyName)); - if (NS_SUCCEEDED(rv)) { - ForEachFontInternal(familyName, mStyle.langGroup, - PR_FALSE, aResolveFontName, fc, closure); - } - } -} - gfxTextRun * gfxFontGroup::MakeEmptyTextRun(const Parameters *aParams, PRUint32 aFlags) { diff --git a/gfx/thebes/src/gfxOS2Fonts.cpp b/gfx/thebes/src/gfxOS2Fonts.cpp index 6dba994ee17..d3149c9680e 100644 --- a/gfx/thebes/src/gfxOS2Fonts.cpp +++ b/gfx/thebes/src/gfxOS2Fonts.cpp @@ -429,7 +429,6 @@ gfxOS2FontGroup::gfxOS2FontGroup(const nsAString& aFamilies, nsStringArray familyArray; ForEachFont(FontCallback, &familyArray); - FindGenericFontFromStyle(PR_TRUE, FontCallback, &familyArray); // To be able to easily search for glyphs in other fonts, append a few good // replacement candidates to the list. The best ones are the Unicode fonts that diff --git a/gfx/thebes/src/gfxPangoFonts.cpp b/gfx/thebes/src/gfxPangoFonts.cpp index baf569672f1..040d6c3209e 100644 --- a/gfx/thebes/src/gfxPangoFonts.cpp +++ b/gfx/thebes/src/gfxPangoFonts.cpp @@ -164,8 +164,6 @@ gfxPangoFontGroup::gfxPangoFontGroup (const nsAString& families, ForEachFontInternal(families, aStyle->langGroup, PR_TRUE, PR_FALSE, FontCallback, &familyArray); - FindGenericFontFromStyle(PR_FALSE, FontCallback, &familyArray); - // Construct a string suitable for fontconfig nsAutoString fcFamilies; if (familyArray.Count()) {