• 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: Questiong on NSString sizeWithAttributes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questiong on NSString sizeWithAttributes


  • Subject: Re: Questiong on NSString sizeWithAttributes
  • From: Uli Kusterer <email@hidden>
  • Date: Wed, 9 Nov 2005 10:06:31 +0100

Am 08.11.2005 um 17:54 schrieb Ed Voas:
When I ask for the 16pt height via sizeWithAttributes, I'm told it has a height of 18. Seems reasonable given the font ascent/descent. But when I ask for the 12 point type height, I get... 18. This time, it's not so cool. In theory I should be getting a height of about 13 or 14. This is causing me to position my text (in this specific case) 4 pixels off from where it should be. The font reports the line height to be 14 for the 12 point text, btw, which sounds right. Yet sizeWithAttributes reports 18.

Ed,

I know you're a guru, so I doubt you'd make this mistake, but since this goes into the archives and someone might google for a similar problem:

Have you tried commenting out the 16pt code to check whether it works then? Just to make sure you're not accidentally passing in the wrong attributes dictionary twice without noticing, or overwriting/ replacing something.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________ 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
  • Follow-Ups:
    • Re: Questiong on NSString sizeWithAttributes
      • From: Ed Voas <email@hidden>
References: 
 >Questiong on NSString sizeWithAttributes (From: Ed Voas <email@hidden>)

  • Prev by Date: Re: Borderless NSWindow contentView problem
  • Next by Date: Re: Borderless NSWindow contentView problem
  • Previous by thread: Re: Questiong on NSString sizeWithAttributes
  • Next by thread: Re: Questiong on NSString sizeWithAttributes
  • Index(es):
    • Date
    • Thread