mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1056479 p1 - add language to FindFamily parameters. r=jfkthame
This commit is contained in:
parent
dcbe3ab36f
commit
dae9a5b2b6
@ -1304,7 +1304,9 @@ gfxDWriteFontList::GetStandardFamilyName(const nsAString& aFontName,
|
||||
}
|
||||
|
||||
gfxFontFamily*
|
||||
gfxDWriteFontList::FindFamily(const nsAString& aFamily, bool aUseSystemFonts)
|
||||
gfxDWriteFontList::FindFamily(const nsAString& aFamily,
|
||||
nsIAtom* aLanguage,
|
||||
bool aUseSystemFonts)
|
||||
{
|
||||
if (!mInitialized) {
|
||||
mInitialized = true;
|
||||
|
@ -365,6 +365,7 @@ public:
|
||||
bool UseGDIFontTableAccess() { return mGDIFontTableAccess; }
|
||||
|
||||
virtual gfxFontFamily* FindFamily(const nsAString& aFamily,
|
||||
nsIAtom* aLanguage = nullptr,
|
||||
bool aUseSystemFonts = false);
|
||||
|
||||
virtual void GetFontFamilyList(nsTArray<nsRefPtr<gfxFontFamily> >& aFamilyArray);
|
||||
|
@ -830,7 +830,9 @@ gfxGDIFontList::MakePlatformFont(const nsAString& aFontName,
|
||||
}
|
||||
|
||||
gfxFontFamily*
|
||||
gfxGDIFontList::FindFamily(const nsAString& aFamily, bool aUseSystemFonts)
|
||||
gfxGDIFontList::FindFamily(const nsAString& aFamily,
|
||||
nsIAtom* aLanguage,
|
||||
bool aUseSystemFonts)
|
||||
{
|
||||
nsAutoString keyName(aFamily);
|
||||
BuildKeyNameFromFontName(keyName);
|
||||
|
@ -310,6 +310,7 @@ public:
|
||||
virtual gfxFontFamily* GetDefaultFont(const gfxFontStyle* aStyle);
|
||||
|
||||
virtual gfxFontFamily* FindFamily(const nsAString& aFamily,
|
||||
nsIAtom* aLanguage = nullptr,
|
||||
bool aUseSystemFonts = false);
|
||||
|
||||
virtual gfxFontEntry* LookupLocalFont(const nsAString& aFontName,
|
||||
|
@ -726,7 +726,9 @@ gfxPlatformFontList::CheckFamily(gfxFontFamily *aFamily)
|
||||
}
|
||||
|
||||
gfxFontFamily*
|
||||
gfxPlatformFontList::FindFamily(const nsAString& aFamily, bool aUseSystemFonts)
|
||||
gfxPlatformFontList::FindFamily(const nsAString& aFamily,
|
||||
nsIAtom* aLanguage,
|
||||
bool aUseSystemFonts)
|
||||
{
|
||||
nsAutoString key;
|
||||
gfxFontFamily *familyEntry;
|
||||
|
@ -126,6 +126,7 @@ public:
|
||||
const gfxFontStyle* aStyle);
|
||||
|
||||
virtual gfxFontFamily* FindFamily(const nsAString& aFamily,
|
||||
nsIAtom* aLanguage = nullptr,
|
||||
bool aUseSystemFonts = false);
|
||||
|
||||
gfxFontEntry* FindFontForFamily(const nsAString& aFamily, const gfxFontStyle* aStyle, bool& aNeedsBold);
|
||||
|
@ -1724,7 +1724,7 @@ gfxFontGroup::FindPlatformFont(const nsAString& aName,
|
||||
// Not known in the user font set ==> check system fonts
|
||||
if (!family) {
|
||||
gfxPlatformFontList *fontList = gfxPlatformFontList::PlatformFontList();
|
||||
family = fontList->FindFamily(aName, mStyle.systemFont);
|
||||
family = fontList->FindFamily(aName, mStyle.language, mStyle.systemFont);
|
||||
if (family) {
|
||||
fe = family->FindFontForStyle(mStyle, needsBold);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user