Re: Simple way to find out baseline for NSAttributedString?
Re: Simple way to find out baseline for NSAttributedString?
- Subject: Re: Simple way to find out baseline for NSAttributedString?
- From: email@hidden
- Date: Thu, 4 Sep 2003 11:15:18 -0700
Have you looked at NSFont's ascender, descender, and
defaultLineHeightForFont methods?
Yes -- but what I want is not the descender for a single font, but for
an attributed string which might consist of several fonts in a row.
Imagine a 72-point Helvetica "A" followed by 60-point Palatino "pple"
followed by a 7-point "(R)". So I need the descender that was
calculated for the entire attributed string.
More ideas?
On Sep 4, 2003, at 10:27 AM, Jonathan E. Jackel wrote:
I am trying to calculate the overall metrics for an NSAttributedString
(to display on a single line) -- basically, its total height, width,
and offset from the bottom the the baseline. I can use
-[NSAttributedString size] to get the width and height of the string
--
but what about the baseline?
--
Dan Wood
Karelia Software, LLC
email@hidden
http://www.karelia.com/
Watson for Mac OS X:
http://www.karelia.com/watson/
_______________________________________________
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.