• 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
Re: OK, but what do 'attributes' look like?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OK, but what do 'attributes' look like?


  • Subject: Re: OK, but what do 'attributes' look like?
  • From: Dave Rosborough <email@hidden>
  • Date: Mon, 8 Mar 2004 21:54:35 -0800

On 8-Mar-04, at 9:37 PM, Denis Stanton wrote:

I tried looking at NSAttributedString already and came up with:

[myString drawInRect: myRect with attributes: [NSDictionary dictionaryWithObject @"Helvetica 9-point" forKey: NSFontAttributeName]];

You need to have an NSFont as the object for the NSFontAttributeName key...

Try this:

[myString drawInRect:myRect withAttributes:[NSDictionary dictionaryWithObject:[NSFont fontWithName:@"Helvetica" size:9.0] forKey:NSFontAttributeName]];

TTYL
DaveR
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: OK, but what do 'attributes' look like? (From: Denis Stanton <email@hidden>)

  • Prev by Date: Re: OK, but what do 'attributes' look like?
  • Next by Date: Re: OK, but what do 'attributes' look like?
  • Previous by thread: Re: OK, but what do 'attributes' look like?
  • Next by thread: Re: OK, but what do 'attributes' look like?
  • Index(es):
    • Date
    • Thread