Re: Normalize an NSAttributedString
Re: Normalize an NSAttributedString
- Subject: Re: Normalize an NSAttributedString
- From: Douglas Davidson <email@hidden>
- Date: Wed, 26 Aug 2009 08:52:20 -0700
On Aug 26, 2009, at 1:30 AM, Alastair Houghton wrote:
On 26 Aug 2009, at 00:56, Martin Wierschin wrote:
Note that there is an issue with this approach, which is that
attribute runs that start in the middle of a grapheme cluster
might result in odd behaviour wrt normalisation. However, it
generally doesn't make sense to have such an attribute run (it's
the equivalent of asking for e.g. a bold "o" with an italic
umlaut, which makes no sense), it's just something that you might
want to be aware of.
Sometimes it's desirable to have such attribute runs. One example
is to highlight combining marks using a different foreground color
than that of the base character.
That's a good point, and if you needed to support that then you'd
have to be very careful dealing with this issue. I guess it's more
common to do that kind of thing for display only?
Unfortunately, there's no guarantee that something like this will
work. Depending on the font, something like an o+umlaut may be
represented with a single glyph, in which case there's currently no
mechanism for coloring the umlaut differently from the o.
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