From 9d580a10437e78ebf150d8908098bb2443aa5343 Mon Sep 17 00:00:00 2001 From: "jdaggett%mozilla.com" Date: Tue, 29 Jan 2008 21:41:46 +0000 Subject: [PATCH] Bug 400717. Explicitly set NSUnitalicFontMask and NSUnboldFontMask font traits to avoid 10.5 inconsistency. r+sr=vlad git-svn-id: svn://10.0.0.236/trunk@244387 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/gfx/thebes/src/gfxQuartzFontCache.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mozilla/gfx/thebes/src/gfxQuartzFontCache.mm b/mozilla/gfx/thebes/src/gfxQuartzFontCache.mm index 6cec4f3b515..fdc1f0387a9 100644 --- a/mozilla/gfx/thebes/src/gfxQuartzFontCache.mm +++ b/mozilla/gfx/thebes/src/gfxQuartzFontCache.mm @@ -547,6 +547,12 @@ gfxQuartzFontCache::InitFontList() PRInt32 weight = [[face objectAtIndex:INDEX_FONT_WEIGHT] unsignedIntValue]; PRUint32 traits = [[face objectAtIndex:INDEX_FONT_TRAITS] unsignedIntValue]; + // 10.5 doesn't set NSUnitalicFontMask and NSUnboldFontMask - manually set these for consistency + if (!(traits & NSBoldFontMask)) + traits |= NSUnboldFontMask; + if (!(traits & NSItalicFontMask)) + traits |= NSUnitalicFontMask; + PR_LOG(gFontInfoLog, PR_LOG_DEBUG, ("(init) family: %s, psname: %s, face: %s, apple-weight: %d, css-weight: %d, traits: %8.8x\n", [availableFamily UTF8String], [psname UTF8String], [[face objectAtIndex:INDEX_FONT_FACE_NAME] UTF8String], weight, gfxQuartzFontCache::AppleWeightToCSSWeight(weight), traits ));