Bezier Text Container
Bezier Text Container
- Subject: Bezier Text Container
- From: Gordon Apple <email@hidden>
- Date: Wed, 21 Feb 2007 21:45:56 -0600
I just posted visual images of a few test samples of a text container
object I wrote: <www.ed4u.com/textflow>. It should handle any
single-subpath connected Bezier path, except that I'm still having a few
issues with NSLayoutManager with the vertical spacing of split lines when
multiple font sizes are used. It doesn't do holes yet, but I think it's a
relatively simple addition from this point. The only interface to the
component is to pass it a NSBezierPath object.
I ran into a few issues that appear to be undocumented, or outright
wrong in the docs. One is that the NSLayoutManager simple bails out on the
first line it can't use, requiring that the container object intervene
before returning and scan (and resulting recompute) to search for a new
viable line. IMHO, the container object should be about geometry, not
searches -- the layout manager should have handled that situation.
The second is that when dealing with split lines, the docs say that the
next call will use the remainingRect that you passed to it in the former
call. Wrong! That only works if there are no font size changes. If the
layout manager detects a font size increase within the first segment, it
will come back to that first segment with a higher rect. I guess that's a
good thing, but contrary to what's in Textlayout.pdf and caused me some
re-writes.
When dealing with split lines and font-size changes within the segments,
either I just haven't figured out how to use it correctly or else
NSLayoutManager is dumber than dirt as far as coordinating what is going on
in separate segments which should be on the same line and don't come out
that way, (See my last example on the website.) I'm trying to figure out
some workarounds. Unfortunately, only the layout manager knows what fonts
may come.
Other than using it myself, I haven't decided what to do with this
component yet. If anyone is interested, let me know.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden