Cocoa Text System: How to determine the caret position?
Cocoa Text System: How to determine the caret position?
- Subject: Cocoa Text System: How to determine the caret position?
- From: "Yung-Luen Lan" <email@hidden>
- Date: Tue, 24 Jun 2008 06:25:02 +0800
Hi,
I'm writing my own text view because I need laying out text along
arbitrary path and vertical text.
Rendering text is good with Core Text. However, I don't know how to
decide where should I draw the caret. The problem is, character and
glyph is not 1-1 mapping. For example, two characters "fi" will be
treat as one ligature glyph. Using Core Text, I can only retreive the
position information of "glyph", not "character." Hence I don't know
how to get the caret position when caret is right in the middle of "f"
and "i".
Is there any way to obtain the position information based on
character, not glyph?
Regards,
yllan
_______________________________________________
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