Re: NSLayoutManager - measuring text with trailing space
Re: NSLayoutManager - measuring text with trailing space
- Subject: Re: NSLayoutManager - measuring text with trailing space
- From: Douglas Davidson <email@hidden>
- Date: Tue, 3 Oct 2006 09:19:06 -0700
On Oct 2, 2006, at 1:01 PM, Scott Thompson wrote:
I asked about a similar issue a while back, but this time I'm
trying to do something different.
I have a line of text in an NSAttributedString that contains
trailing spaces. I want to measure the text taking the whitespace
into account. The NSLayoutManager routines I've used return the
actual bounds that are covered with glyphs, but ignore the trailing
space. Is there some way to measure the text with that space
accounted for?
Try the -rectArrayForCharacter/GlyphRange:withinSelectedCharacter/
GlyphRange:inTextContainer:rectCount: methods. These are the methods
used to obtain the selection highlight rects.
Douglas Davidson
_______________________________________________
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