Non-rectangular text container question
Non-rectangular text container question
- Subject: Non-rectangular text container question
- From: Rolland Bryan <email@hidden>
- Date: Fri, 09 Sep 2005 11:07:59 +0200
I am experimenting with the Apple Cocoa typography system. I created an
NSTextContainer subclass that supports a geometry that is a rectangular
doughnut. Text is allowed around the "hole" but not in it.
Now, consider a line that crosses the hole. My text container adjusts the
type system's proposed rectangle to the left side of the hole and returns
the right side as the remaining rect, as explained in the documentation.
However, the system treats these as two independent lines, rather than a
single line with a gap in it. The result is that if the size of largest
character on each side is different, then each side has a different height
and baseline position. What's more, the position of the line below is
determined solely by the height of the right side.
I have subclassed NSTypesetter and NSLayoutManager, simply deferring to
super in overridden methods, to try to trace how things work. I can see
what's happening, but cannot see how change the behaviour.
To be clear, what I would like to do is to treat a line across the hole as a
single line with a gap in it, applying word wrap logic across the gap.
By the way, this is on 10.4.2
Can anyone help?
_______________________________________________
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