NSLayoutManager and whitespace
NSLayoutManager and whitespace
- Subject: NSLayoutManager and whitespace
- From: Scott Thompson <email@hidden>
- Date: Thu, 13 Apr 2006 02:52:56 -0500
I'm trying to measure some text using NSLayoutManager and I'm having
trouble with trailing whitespace.
What I want to do is measure some text which will be drawn later.
The problem I'm having is for lines of text with trailing
whitespace. The simplest case would be a single word with a space
after it i.e. "Preferences_" (the underscore character in this case
represents a space)
When I measure this string with a text layout object, it returns a
width of something like 67 (for a particular font etc...).
If I then come back and draw that string into a field that is 67
points wide, the string hyphenates and wraps.
What I think is happening is that my text field is wide enough for
"Preferences", but is not wide enough for "Preferences_" so when the
typesetter sees it's not going to fit, it hypenates and wraps.
I've tried just about every line fragment rect routine I can find.
Is there some way to get the entire advance width of a line from the
layout manager?
Scott
_______________________________________________
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