Simple way to find out baseline for NSAttributedString?
Simple way to find out baseline for NSAttributedString?
- Subject: Simple way to find out baseline for NSAttributedString?
- From: email@hidden
- Date: Thu, 4 Sep 2003 09:57:32 -0700
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?
I have found some pretty hairy techniques for building up an
NSLayoutManager, NSTextContainer, etc., and querying individual glyphs
(e.g. <
http://cocoa.mamasam.com/COCOADEV/2002/11/1/49059.php>), but I
think that what I want is much simpler than this -- so maybe there is a
simpler solution. Any suggestions?
--
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.