Re: Arbitrary Attributes affect text layout
Re: Arbitrary Attributes affect text layout
- Subject: Re: Arbitrary Attributes affect text layout
- From: Douglas Davidson <email@hidden>
- Date: Tue, 2 Feb 2010 11:07:39 -0800
On Feb 2, 2010, at 11:00 AM, Philip White wrote:
> Hello, thanks for the quick response. I didn't know that attributes couldn't be applied to only parts of composed character sequence ranges. When I only apply attributes to ranges returned by rangeOfComposedCharacterSequenceAtIndex: I don't have any text mangling. That should solve my problem.
Generally speaking, most text manipulation should work in units of character clusters rather than individual characters, since the cluster is effectively the user-perceived character unit. I suppose there might be potential uses for such things as e.g. applying one color to a base character and another color to a diacritic attached to it, but this is not something that fonts will reliably support in general. The Cocoa text system still should handle these sorts of situations reasonably, so you should file a bug about the problems you have been seeing, but I'd suggest using rangeOfComposedCharacterSequenceAtIndex: and the like as a workaround.
Douglas Davidson
_______________________________________________
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