Re: Subclassing NSLayoutManager
Re: Subclassing NSLayoutManager
- Subject: Re: Subclassing NSLayoutManager
- From: Douglas Davidson <email@hidden>
- Date: Mon, 24 Feb 2003 11:36:12 -0800
On Monday, February 24, 2003, at 10:45 AM, Charles Srstka wrote:
Yeah, that's what I figured. Actually, that's what I'm using right now
- a custom NSTypesetter using replaceGlyphAtIndex:withGlyph:. The
trouble is, the performance of my typesetter seems to be not as good
as the default typesetter, and I figured that I might be able to help
things a bit if I could override the part of NSLayoutManager that
generates the glyphs, so they would just be generated once instead of
first generating the default glyph, and then replacing it with a new
glyph that it has to generate *again*.
Well, in practice the glyph generation time is usually small compared
to the layout time, so that may not be the issue. There is the issue,
though, that if glyphs are externally modified in this way, the layout
manager does have to do some extra storage and extra invalidation under
some circumstances. I don't think you can get around that at this
point.
I'll have a look at NSGlyphInfo. Is it possible to use this to return
multiple glyphs for a character that usually maps to only one glyph,
or can I only return the same number of glyphs that would usually be
mapped?
I believe you can supply a single glyph for multiple characters, but I
don't think you can supply multiple glyphs for a single character.
Douglas Davidson
_______________________________________________
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.