Re: Glyph from Character
Re: Glyph from Character
- Subject: Re: Glyph from Character
- From: glenn andreas <email@hidden>
- Date: Wed, 21 Mar 2007 16:33:55 -0500
On Mar 21, 2007, at 3:56 PM, Gordon Apple wrote:
Ok, so apparently there's no easy way to get just one glyph
index. I
don't understand why it should be so difficult. I'm not dealing with
context, I just want the index of one lone glyph.
Consider that some languages use different glyphs depending on if the
character is the first character in a word, in the middle, or at the
end of the word. As a result, you can't just ask for "the" glyph
that corresponds to the character, since there are potentially three.
Alternately, consider something like a character with some sort of
umlaut or accent mark. In some fonts, there is a specific glyph that
represents this, in other fonts, it needs to be synthesized from two
glyphs (the base character, and a combining accent mark).
And even rules like this get thrown out for some cases and some fonts
- for example, the two characters "fl" can either be two glyphs, or a
single ligature glyph that combines the two characters into one
(where the top of the "f" touches the top of the "l") - so again,
there isn't a single glyph (in this case, there are two different
glyphs for "lf", but only one glyph for "fl").
And then there's the whole "what to do if this character doesn't have
a glyph representation in the current font" issue (in which case it
would have to be obtained from a different font, and the glyph index
could then be totally different).
So the problem is that there are many corner cases that need to be
handled - and a layout manager takes care of all of that, but it
needs context to be able to get the correct answer.
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)
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