mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 22:37:50 +00:00
Bug 476724 - clean out Windows-specific flags from gfxFontEntry. r=vlad
This commit is contained in:
parent
b304b224eb
commit
a9f45d5c9a
@ -78,8 +78,6 @@ public:
|
||||
{
|
||||
mFontFace = nsnull;
|
||||
mFTFontIndex = 0;
|
||||
mUnicodeFont = PR_FALSE;
|
||||
mSymbolFont = PR_FALSE;
|
||||
}
|
||||
|
||||
FontEntry(const FontEntry& aFontEntry);
|
||||
@ -89,7 +87,6 @@ public:
|
||||
return mFaceName;
|
||||
}
|
||||
|
||||
|
||||
static FontEntry*
|
||||
CreateFontEntry(const gfxProxyFontEntry &aProxyEntry, nsISupports *aLoader,
|
||||
const PRUint8 *aFontData, PRUint32 aLength);
|
||||
@ -104,9 +101,6 @@ public:
|
||||
nsString mFaceName;
|
||||
nsCString mFilename;
|
||||
PRUint8 mFTFontIndex;
|
||||
|
||||
PRPackedBool mTrueType : 1;
|
||||
PRPackedBool mIsType1 : 1;
|
||||
};
|
||||
|
||||
|
||||
|
@ -159,8 +159,6 @@ public:
|
||||
|
||||
gfxFontEntry(const nsAString& aName) :
|
||||
mName(aName), mItalic(PR_FALSE), mFixedPitch(PR_FALSE),
|
||||
mUnicodeFont(PR_FALSE), mSymbolFont(PR_FALSE),
|
||||
mTrueType(PR_FALSE), mIsType1(PR_FALSE),
|
||||
mIsProxy(PR_FALSE), mIsValid(PR_TRUE),
|
||||
mIsBadUnderlineFont(PR_FALSE),
|
||||
mWeight(500), mStretch(NS_FONT_STRETCH_NORMAL),
|
||||
@ -169,9 +167,7 @@ public:
|
||||
|
||||
gfxFontEntry(const gfxFontEntry& aEntry) :
|
||||
mName(aEntry.mName), mItalic(aEntry.mItalic),
|
||||
mFixedPitch(aEntry.mFixedPitch), mUnicodeFont(aEntry.mUnicodeFont),
|
||||
mSymbolFont(aEntry.mSymbolFont), mTrueType(aEntry.mTrueType),
|
||||
mIsType1(aEntry.mIsType1), mIsProxy(aEntry.mIsProxy),
|
||||
mFixedPitch(aEntry.mFixedPitch), mIsProxy(aEntry.mIsProxy),
|
||||
mIsValid(aEntry.mIsValid), mIsBadUnderlineFont(aEntry.mIsBadUnderlineFont),
|
||||
mWeight(aEntry.mWeight), mCmapInitialized(aEntry.mCmapInitialized),
|
||||
mCharacterMap(aEntry.mCharacterMap), mUserFontData(aEntry.mUserFontData)
|
||||
@ -203,10 +199,6 @@ public:
|
||||
PRPackedBool mItalic : 1;
|
||||
PRPackedBool mFixedPitch : 1;
|
||||
|
||||
PRPackedBool mUnicodeFont : 1;
|
||||
PRPackedBool mSymbolFont : 1;
|
||||
PRPackedBool mTrueType : 1;
|
||||
PRPackedBool mIsType1 : 1;
|
||||
PRPackedBool mIsProxy : 1;
|
||||
PRPackedBool mIsValid : 1;
|
||||
|
||||
|
@ -113,10 +113,10 @@ public:
|
||||
FontEntry(const nsAString& aFaceName) :
|
||||
gfxFontEntry(aFaceName), mFontType(GFX_FONT_TYPE_UNKNOWN),
|
||||
mForceGDI(PR_FALSE), mUnknownCMAP(PR_FALSE),
|
||||
mUnicodeFont(PR_FALSE), mSymbolFont(PR_FALSE),
|
||||
mCharset(0), mUnicodeRanges(0)
|
||||
{
|
||||
mUnicodeFont = PR_FALSE;
|
||||
mSymbolFont = PR_FALSE;
|
||||
|
||||
}
|
||||
|
||||
FontEntry(const FontEntry& aFontEntry) :
|
||||
@ -126,6 +126,8 @@ public:
|
||||
mFontType(aFontEntry.mFontType),
|
||||
mForceGDI(aFontEntry.mForceGDI),
|
||||
mUnknownCMAP(aFontEntry.mUnknownCMAP),
|
||||
mUnicodeFont(aFontEntry.mUnicodeFont),
|
||||
mSymbolFont(aFontEntry.mSymbolFont),
|
||||
mCharset(aFontEntry.mCharset),
|
||||
mUnicodeRanges(aFontEntry.mUnicodeRanges)
|
||||
{
|
||||
@ -270,6 +272,8 @@ public:
|
||||
gfxWindowsFontType mFontType;
|
||||
PRPackedBool mForceGDI : 1;
|
||||
PRPackedBool mUnknownCMAP : 1;
|
||||
PRPackedBool mUnicodeFont : 1;
|
||||
PRPackedBool mSymbolFont : 1;
|
||||
|
||||
std::bitset<256> mCharset;
|
||||
std::bitset<128> mUnicodeRanges;
|
||||
|
@ -77,9 +77,7 @@ public:
|
||||
|
||||
// initialize with Apple-type weight [1..14]
|
||||
MacOSFontEntry(const nsAString& aPostscriptName, PRInt32 aAppleWeight, PRUint32 aTraits,
|
||||
MacOSFamilyEntry *aFamily, PRBool aIsStandardFace = PR_FALSE);
|
||||
|
||||
const nsString& FamilyName();
|
||||
PRBool aIsStandardFace = PR_FALSE);
|
||||
|
||||
PRUint32 Traits() { return mTraits; }
|
||||
|
||||
@ -93,7 +91,6 @@ protected:
|
||||
gfxUserFontData *aUserFontData);
|
||||
|
||||
PRUint32 mTraits;
|
||||
MacOSFamilyEntry *mFamily;
|
||||
|
||||
ATSUFontID mATSUFontID;
|
||||
PRPackedBool mATSUIDInitialized;
|
||||
|
@ -119,9 +119,9 @@ gfxQuartzFontCache::GenerateFontListKey(const nsAString& aKeyName, nsAString& aR
|
||||
#pragma mark-
|
||||
|
||||
MacOSFontEntry::MacOSFontEntry(const nsAString& aPostscriptName,
|
||||
PRInt32 aAppleWeight, PRUint32 aTraits, MacOSFamilyEntry *aFamily,
|
||||
PRInt32 aAppleWeight, PRUint32 aTraits,
|
||||
PRBool aIsStandardFace)
|
||||
: gfxFontEntry(aPostscriptName), mTraits(aTraits), mFamily(aFamily), mATSUFontID(0),
|
||||
: gfxFontEntry(aPostscriptName), mTraits(aTraits), mATSUFontID(0),
|
||||
mATSUIDInitialized(0), mStandardFace(aIsStandardFace)
|
||||
{
|
||||
mWeight = gfxQuartzFontCache::AppleWeightToCSSWeight(aAppleWeight) * 100;
|
||||
@ -133,7 +133,7 @@ MacOSFontEntry::MacOSFontEntry(const nsAString& aPostscriptName,
|
||||
MacOSFontEntry::MacOSFontEntry(const nsAString& aPostscriptName, ATSUFontID aFontID,
|
||||
PRUint16 aWeight, PRUint16 aStretch, PRUint32 aItalicStyle,
|
||||
gfxUserFontData *aUserFontData)
|
||||
: gfxFontEntry(aPostscriptName), mFamily(nsnull), mATSUFontID(aFontID),
|
||||
: gfxFontEntry(aPostscriptName), mATSUFontID(aFontID),
|
||||
mATSUIDInitialized(PR_TRUE), mStandardFace(PR_FALSE)
|
||||
{
|
||||
// xxx - stretch is basically ignored for now
|
||||
@ -149,13 +149,6 @@ MacOSFontEntry::MacOSFontEntry(const nsAString& aPostscriptName, ATSUFontID aFon
|
||||
(mWeight >= 600 ? NSBoldFontMask : NSUnboldFontMask);
|
||||
}
|
||||
|
||||
const nsString&
|
||||
MacOSFontEntry::FamilyName()
|
||||
{
|
||||
// XXXbz what if mFamily is null, as it seems to be for downloaded fonts?
|
||||
return mFamily->Name();
|
||||
}
|
||||
|
||||
ATSUFontID
|
||||
MacOSFontEntry::GetFontID()
|
||||
{
|
||||
@ -780,7 +773,7 @@ gfxQuartzFontCache::InitFontList()
|
||||
}
|
||||
|
||||
// create a font entry
|
||||
MacOSFontEntry *fontEntry = new MacOSFontEntry(postscriptFontName, weight, traits, familyEntry, isStandardFace);
|
||||
MacOSFontEntry *fontEntry = new MacOSFontEntry(postscriptFontName, weight, traits, isStandardFace);
|
||||
if (!fontEntry) break;
|
||||
|
||||
// insert into font entry array of family
|
||||
@ -891,7 +884,6 @@ gfxQuartzFontCache::InitSingleFaceList()
|
||||
mFontFamilies.Put(key, familyEntry);
|
||||
PR_LOG(gFontInfoLog, PR_LOG_DEBUG, ("(fontinit-singleface) family: %s, psname: %s\n", [display UTF8String], [faceName UTF8String]));
|
||||
}
|
||||
fontEntry->mFamily = familyEntry;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -192,11 +192,12 @@ gfxWindowsPlatform::HashEnumFunc(nsStringHashKey::KeyType aKey,
|
||||
style.langGroup = data->mLangGroup;
|
||||
nsRefPtr<FontEntry> aFontEntry = aFontFamily->FindFontEntry(style);
|
||||
|
||||
|
||||
#ifndef MOZ_FT2_FONTS
|
||||
/* skip symbol fonts */
|
||||
if (aFontEntry->mSymbolFont)
|
||||
return PL_DHASH_NEXT;
|
||||
|
||||
#ifndef MOZ_FT2_FONTS
|
||||
if (aFontEntry->SupportsLangGroup(data->mLangGroup) &&
|
||||
aFontEntry->MatchesGenericFamily(data->mGenericFamily))
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user