Re: Modifying glyph storage in NSLayoutManager SOLVED
Re: Modifying glyph storage in NSLayoutManager SOLVED
- Subject: Re: Modifying glyph storage in NSLayoutManager SOLVED
- From: Douglas Davidson <email@hidden>
- Date: Tue, 18 Mar 2008 17:18:24 -0700
On Mar 18, 2008, at 4:40 PM, Ross Carter wrote:
I found that I can call the NSLayoutManager methods for modifying
glyph storage (replaceGlyphAtIndex:withGlyph:,
insertGlyph:atGlyphIndex:characterIndex:, etc.) without errors if I
place the code in an override of NSATSTypesetter -
beginLineWithGlyphAtIndex: and inform the typesetter of any change
in glyph count by calling setParagraphGlyphRange:separatorGlyphRange:.
If I understand it correctly, what you want to do is to modify the
glyphs before the stock system typesetter has a chance to do any
layout with them, and then let the stock system typesetter lay out the
modified glyphs as it would have if those had been the original
glyphs. In that case, whatever typesetter method you override will
need to be early in the process, before the typesetter has obtained
the glyphs it is going to lay out. I'm not sure whether -
beginLineWithGlyphAtIndex: is the most appropriate place, but I will
take a look at it and see what I can determine.
Douglas Davidson
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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