author | Jonathan Kew <jfkthame@gmail.com> |
Tue, 16 Nov 2010 08:34:38 +0000 | |
changeset 57566 | fedc658ef505386cc09e24e05b15181452ab7bfd |
parent 57565 | 2951546c734a5d4b919af1cd0b31d9c72051c5c6 |
child 57567 | db24505d74e9fcedb413c2bf0f674b00ab8513c5 |
push id | 16984 |
push user | jkew@mozilla.com |
push date | Tue, 16 Nov 2010 08:41:03 +0000 |
treeherder | mozilla-central@db24505d74e9 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jdaggett |
bugs | 611855 |
milestone | 2.0b8pre |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/gfx/thebes/gfxMacPlatformFontList.mm +++ b/gfx/thebes/gfxMacPlatformFontList.mm @@ -438,17 +438,22 @@ gfxMacFontFamily::FindStyleVariations() if (!fontEntry) break; // set additional properties based on the traits reported by Cocoa if (macTraits & (NSCondensedFontMask | NSNarrowFontMask | NSCompressedFontMask)) { fontEntry->mStretch = NS_FONT_STRETCH_CONDENSED; } 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) { fontEntry->mFixedPitch = PR_TRUE; } #ifdef PR_LOGGING if (LOG_ENABLED()) {