64-bit Mac OS X bustage fix for font code. b=532346 r=jkew r=joshmoz

This commit is contained in:
Jeff Wang 2009-12-15 18:16:12 -05:00
parent 11a169cbb4
commit 409a908656
2 changed files with 16 additions and 4 deletions

View File

@ -70,7 +70,9 @@ public:
ATSFontRef GetFontRef();
nsresult ReadCMAP();
#ifndef __LP64__
PRBool UseLiGothicAtsuiHack() { return mUseLiGothicAtsuiHack; }
#endif
protected:
// for use with data fonts
@ -82,7 +84,9 @@ protected:
ATSFontRef mATSFontRef;
PRPackedBool mATSFontRefInitialized;
#ifndef __LP64__
PRPackedBool mUseLiGothicAtsuiHack;
#endif
};
class gfxMacPlatformFontList : public gfxPlatformFontList {

View File

@ -117,8 +117,10 @@ MacOSFontEntry::MacOSFontEntry(const nsAString& aPostscriptName,
PRBool aIsStandardFace)
: gfxFontEntry(aPostscriptName, aFamily, aIsStandardFace),
mATSFontRef(0),
mATSFontRefInitialized(PR_FALSE),
mUseLiGothicAtsuiHack(PR_FALSE)
mATSFontRefInitialized(PR_FALSE)
#ifndef __LP64__
, mUseLiGothicAtsuiHack(PR_FALSE)
#endif
{
mWeight = aWeight;
}
@ -128,8 +130,10 @@ MacOSFontEntry::MacOSFontEntry(const nsAString& aPostscriptName, ATSFontRef aFon
gfxUserFontData *aUserFontData)
: gfxFontEntry(aPostscriptName),
mATSFontRef(aFontRef),
mATSFontRefInitialized(PR_TRUE),
mUseLiGothicAtsuiHack(PR_FALSE)
mATSFontRefInitialized(PR_TRUE)
#ifndef __LP64__
, mUseLiGothicAtsuiHack(PR_FALSE)
#endif
{
// xxx - stretch is basically ignored for now
@ -265,6 +269,8 @@ MacOSFontEntry::ReadCMAP()
}
}
#ifndef __LP64__ /* ATSUI not available on 64-bit */
if ((gfxPlatformMac::GetPlatform()->OSXVersion() &
MAC_OS_X_MAJOR_VERSION_MASK) == MAC_OS_X_VERSION_10_6_HEX) {
// even ruder hack - LiGothic font on 10.6 has a bad glyph for U+775B
@ -281,6 +287,8 @@ MacOSFontEntry::ReadCMAP()
}
}
#endif /* not __LP64__ */
PR_LOG(gFontInfoLog, PR_LOG_DEBUG, ("(fontinit-cmap) psname: %s, size: %d\n",
NS_ConvertUTF16toUTF8(mName).get(), mCharacterMap.GetSize()));