Re: Glyph from Character
Re: Glyph from Character
- Subject: Re: Glyph from Character
- From: Gordon Apple <email@hidden>
- Date: Wed, 21 Mar 2007 17:50:11 -0500
I very well understand the complexities of layout, having written my own
text editor at one point. That's still doesn't explain why it is so friggin
difficult to get the glyph index of a single isolated character. This isn't
the application, but for the sake of argument lets say that I wanted to make
a set of flash cards to help someone learn the Greek or Cyrillic alphabet.
I need one letter at a time. I may want to frame it and put other stuff on
the card. The point is that I only want the Bezier shape of one big glyph,
devoid of layout context.
Simple tasks should be simple. I shouldn't have to call a construction
contractor to hammer a nail.
>
> 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