Re: glyphRangeForCharacterRange
Re: glyphRangeForCharacterRange
- Subject: Re: glyphRangeForCharacterRange
- From: glenn andreas <email@hidden>
- Date: Sat, 25 Aug 2007 12:05:47 -0500
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.
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build,
mutate, evolve, animate
_______________________________________________
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