Problem with fontDescriptorWithFontAttributes:
Problem with fontDescriptorWithFontAttributes:
- Subject: Problem with fontDescriptorWithFontAttributes:
- From: Laurent Daudelin <email@hidden>
- Date: Fri, 18 Sep 2009 14:06:11 -0700
Not sure if it's a known issue but given this:
currentFontDescriptor = [NSFontDescriptor
fontDescriptorWithFontAttributes:fontAttributes];
NSFont *fontToUse = [NSFont fontWithDescriptor:currentFontDescriptor
size:[[self font] pointSize]];
I'm getting this in the debugger:
(gdb) po currentFontDescriptor
NSCTFontDescriptor <0x2b0fe0> = {
NSFontColorAttribute = NSCalibratedWhiteColorSpace 0 1;
NSFontNameAttribute = LucidaGrande;
NSFontSizeAttribute = 11;
}
(gdb) po [fontToUse fontDescriptor]
NSCTFontDescriptor <0x269460> = {
NSFontNameAttribute = LucidaGrande;
NSFontSizeAttribute = 11;
}
As a result, I can't set the font color. What am I doing wrong? This
is with 10.5 as base SDK.
Anybody has any idea?
-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org
Logiciels Nemesys Software email@hidden
Photo Gallery Store: http://laurentdaudelin.shutterbugstorefront.com/g/galleries
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden