Re: Questiong on NSString sizeWithAttributes
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