Re: Subclassing NSLayoutManager
Re: Subclassing NSLayoutManager
- Subject: Re: Subclassing NSLayoutManager
- From: Charles Srstka <email@hidden>
- Date: Mon, 24 Feb 2003 17:42:37 -0600
On Monday, February 24, 2003, at 04:01 PM, Douglas Davidson wrote:
On Monday, February 24, 2003, at 1:46 PM, Charles Srstka wrote:
I was actually hoping that by subclassing NSLayoutManager or
NSGlyphInfo or whatever that I could get around having to use an
NSTypesetter subclass and just use the default one instead as it
seems to be a lot more optimized than the quick typesetter I was able
to hack together.
Well, the glyph munging doesn't actually have to be done from the
typesetter; you could do it yourself at some point after glyph
generation. The trick is to be able to do it at the right time. You
could try using an NSTypesetter class that grabs and holds onto the
layout manager's existing default typesetter and passes all messages
on to it, but intervenes before the calls to layoutGlyphs... to do the
glyph munging first.
Thanks, that sounds like a very reasonable solution. Do you know if
there's any way to coerce the default typesetter to wrap the text after
a fixed number of characters rather than right at the bounds of the
enclosing text container? If I could do that, I could dump my
NSTypesetter subclass altogether...
Thanks,
Charles
_______________________________________________
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.