Re: Subclassing NSLayoutManager
Re: Subclassing NSLayoutManager
- Subject: Re: Subclassing NSLayoutManager
- From: Douglas Davidson <email@hidden>
- Date: Mon, 24 Feb 2003 09:56:06 -0800
On Sunday, February 23, 2003, at 5:42 PM, Charles Srstka wrote:
I'm wondering what NSLayoutManager's primitive methods are for looking
up the glyph(s) that correspond to a character. I'd like to subclass
it and cause some characters to sometimes map to different glyphs.
NSLayoutManager has quite a lot of methods pertaining to looking up
glyphs - which are the ones I should override?
We do not yet really have a public interface for glyph generation.
However, it is possible to tell the layout manager to use one glyph or
another, via the primitives for adding and removing glyphs, e.g.
replaceGlyphAtIndex:withGlyph:. These methods should be used with some
care; typically they are called after glyph generation has already been
performed, for example by the typesetter during layout. You may find
it more convenient to use the NSGlyphInfoAttributeName attribute, which
allows full control over the glyph to be used at the attribute level.
See NSGlyphInfo.h for more information.
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.