bug 611855 - work around incorrect font traits for helvetica light oblique on 10.6.5. r=jdaggett approval2.0=dbaron

This commit is contained in:
Jonathan Kew 2010-11-16 08:34:38 +00:00
parent ca574a610e
commit 16bc107292

View File

@ -443,7 +443,12 @@ gfxMacFontFamily::FindStyleVariations()
} else if (macTraits & NSExpandedFontMask) {
fontEntry->mStretch = NS_FONT_STRETCH_EXPANDED;
}
if (macTraits & NSItalicFontMask) {
// Cocoa fails to set the Italic traits bit for HelveticaLightItalic,
// at least (see bug 611855), so check for style name endings as well
if ((macTraits & NSItalicFontMask) ||
[facename hasSuffix:@"Italic"] ||
[facename hasSuffix:@"Oblique"])
{
fontEntry->mItalic = PR_TRUE;
}
if (macTraits & NSFixedPitchFontMask) {