Re: glyphRangeForCharacterRange
Re: glyphRangeForCharacterRange
- Subject: Re: glyphRangeForCharacterRange
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Sun, 26 Aug 2007 19:38:28 +0200
On 25 Aug 2007, at 19:05, glenn andreas wrote:
On Aug 25, 2007, at 4:33 AM, Gerriet M. Denkmann wrote:
In a NSTextView at index i I have a DESERET CAPITAL LETTER LONG I,
which has Unicode 10400(D801+DC00).
That is: it uses two internal characters in NSString and one
glyph. There is no apparent way to decompose this character.
The result is:
glyphRange {i, 2} actualCharRange {i, 2}
Why has the glyphRange a length of 2 ?
From my understanding of the text system, it tries to maintain the
same number of glyphs as characters, since that keeps the mapping
between the easier and faster (i.e., it only has to start special
casing thing when multiple glyphs are used for a single
character). If you look at the glyphs you'll probably see that one
of the two glyphs is NSNullGlyph (i.e., 0x0) and that the other one
is the glyph.
You are absolutely right: the first one looks like a valid glyph, the
second one is NSNullGlyph.
Gerriet.
_______________________________________________
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