• 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: NSFont and determining the advancement of a given string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSFont and determining the advancement of a given string


  • Subject: Re: NSFont and determining the advancement of a given string
  • From: Scott Stevenson <email@hidden>
  • Date: Sun, 15 Oct 2006 00:48:51 -0700


On Oct 14, 2006, at 11:51 PM, A Blossom of Paradise wrote:

can someone give me some advice how to get a Helvetica 12.0pt bold NSFont? i can [NSFont fontWithName : @"Helvetica" size: 12.0], but where is the bold!!!???

NSFontDescriptor with the NSFontBoldTrait attribute.

and how can i find how much space (advancement) an arbitrary string will take to display?

NSString has a -sizeWithAttributes method.

NSAttributedString has one called -size.

   - Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >NSFont and determining the advancement of a given string (From: "A Blossom of Paradise" <email@hidden>)

  • Prev by Date: NSFont and determining the advancement of a given string
  • Next by Date: Re: Checking for internet connection?
  • Previous by thread: NSFont and determining the advancement of a given string
  • Next by thread: Re: NSFont and determining the advancement of a given string
  • Index(es):
    • Date
    • Thread