зеркало из https://github.com/mozilla/gecko-dev.git
[Bug 539037] Qt bustage in gfxFontEntry. r=vlad. qt only
This commit is contained in:
Родитель
47b0c2afda
Коммит
503a9d4268
|
@ -80,8 +80,10 @@ public:
|
|||
FontFamily *FindFontFamily(const nsAString& aName);
|
||||
FontEntry *FindFontEntry(const nsAString& aFamilyName, const gfxFontStyle& aFontStyle);
|
||||
already_AddRefed<gfxFont> FindFontForChar(PRUint32 aCh, gfxFont *aFont);
|
||||
PRBool GetPrefFontEntries(const nsCString& aLangGroup, nsTArray<nsRefPtr<FontEntry> > *aFontEntryList);
|
||||
void SetPrefFontEntries(const nsCString& aLangGroup, nsTArray<nsRefPtr<FontEntry> >& aFontEntryList);
|
||||
PRBool GetPrefFontEntries(const nsCString& aLangGroup, nsTArray<nsRefPtr<gfxFontEntry> > *aFontEntryList);
|
||||
void SetPrefFontEntries(const nsCString& aLangGroup, nsTArray<nsRefPtr<gfxFontEntry> >& aFontEntryList);
|
||||
|
||||
void ClearPrefFonts() { mPrefFonts.Clear(); }
|
||||
|
||||
FT_Library GetFTLibrary();
|
||||
|
||||
|
@ -90,6 +92,10 @@ protected:
|
|||
|
||||
private:
|
||||
virtual qcms_profile *GetPlatformCMSOutputProfile();
|
||||
|
||||
// TODO: unify this with mPrefFonts (NB: holds families, not fonts) in gfxPlatformFontList
|
||||
nsDataHashtable<nsCStringHashKey, nsTArray<nsRefPtr<gfxFontEntry> > > mPrefFonts;
|
||||
|
||||
};
|
||||
|
||||
#endif /* GFX_PLATFORM_QT_H */
|
||||
|
|
|
@ -83,6 +83,8 @@ static FT_Library gPlatformFTLibrary = NULL;
|
|||
|
||||
gfxQtPlatform::gfxQtPlatform()
|
||||
{
|
||||
mPrefFonts.Init(50);
|
||||
|
||||
if (!sFontconfigUtils)
|
||||
sFontconfigUtils = gfxFontconfigUtils::GetFontconfigUtils();
|
||||
|
||||
|
@ -153,7 +155,6 @@ gfxQtPlatform::UpdateFontList()
|
|||
FcPattern *pat = NULL;
|
||||
FcObjectSet *os = NULL;
|
||||
FcFontSet *fs = NULL;
|
||||
PRInt32 result = -1;
|
||||
|
||||
pat = FcPatternCreate();
|
||||
os = FcObjectSetBuild(FC_FAMILY, FC_FILE, FC_INDEX, FC_WEIGHT, FC_SLANT, FC_WIDTH, NULL);
|
||||
|
@ -417,13 +418,13 @@ gfxQtPlatform::FindFontForChar(PRUint32 aCh, gfxFont *aFont)
|
|||
}
|
||||
|
||||
PRBool
|
||||
gfxQtPlatform::GetPrefFontEntries(const nsCString& aKey, nsTArray<nsRefPtr<FontEntry> > *aFontEntryList)
|
||||
gfxQtPlatform::GetPrefFontEntries(const nsCString& aKey, nsTArray<nsRefPtr<gfxFontEntry> > *array)
|
||||
{
|
||||
return gPrefFonts->Get(aKey, aFontEntryList);
|
||||
return mPrefFonts.Get(aKey, array);
|
||||
}
|
||||
|
||||
void
|
||||
gfxQtPlatform::SetPrefFontEntries(const nsCString& aKey, nsTArray<nsRefPtr<FontEntry> >& aFontEntryList)
|
||||
gfxQtPlatform::SetPrefFontEntries(const nsCString& aKey, nsTArray<nsRefPtr<gfxFontEntry> >& array)
|
||||
{
|
||||
gPrefFonts->Put(aKey, aFontEntryList);
|
||||
mPrefFonts.Put(aKey, array);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче