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
This commit is contained in:
jdaggett%mozilla.com
2008-01-29 21:41:46 +00:00
parent 47a7cf7e3b
commit 9d580a1043

View File

@@ -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 ));