glyphRangeForCharacterRange
glyphRangeForCharacterRange
- Subject: glyphRangeForCharacterRange
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Sat, 25 Aug 2007 11:33:57 +0200
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.
NSRange charRange = NSMakeRange( i, 1 );
NSRange actualCharRange ;
NSRange glyphRange = [ layoutManager glyphRangeForCharacterRange:
charRange
actualCharacterRange: &actualCharRange
];
NSLog(@"%s glyphRange %@ actualCharRange %@",__FUNCTION__,
NSStringFromRange(glyphRange), NSStringFromRange(actualCharRange));
The result is:
glyphRange {i, 2} actualCharRange {i, 2}
Why has the glyphRange a length of 2 ?
Kind regards,
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