Bug 548983. Override GetStandardFamilyName for the DWrite font list. r=bas

This commit is contained in:
John Daggett 2010-02-28 16:27:22 +09:00
parent 06bd76881c
commit 77966dd811
2 changed files with 16 additions and 0 deletions

View File

@ -519,3 +519,16 @@ gfxDWriteFontList::InitFontList()
StartLoader(kDelayBeforeLoadingFonts, kIntervalBetweenLoadingFonts);
}
PRBool
gfxDWriteFontList::GetStandardFamilyName(const nsAString& aFontName,
nsAString& aFamilyName)
{
gfxFontFamily *family = FindFamily(aFontName);
if (family) {
family->LocalizedName(aFamilyName);
return PR_TRUE;
}
return PR_FALSE;
}

View File

@ -200,6 +200,9 @@ public:
const PRUint8 *aFontData,
PRUint32 aLength);
PRBool GetStandardFamilyName(const nsAString& aFontName,
nsAString& aFamilyName);
private:
friend class gfxDWriteFontFamily;