• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problem with fontDescriptorWithFontAttributes:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Problem with fontDescriptorWithFontAttributes:
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Re: What is the life of the c string returned by NSString's UTF8String method?
  • Next by Date: Re: Menu shortcuts without modifiers?
  • Previous by thread: Re: getting accessor method info in a different class.
  • Next by thread: Re: Problem with fontDescriptorWithFontAttributes:
  • Index(es):
    • Date
    • Thread