freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] How to get the character code from a glyph index?


From: Werner LEMBERG
Subject: Re: [ft] How to get the character code from a glyph index?
Date: Sun, 08 Nov 2009 07:45:35 +0100 (CET)

> As I know, FT_Get_Char_Index() is to retrieve the glyph index given
> a character code.
> 
> Does there exist a reverse function?

No.  The problem is that there is no one-to-one mapping.  For example,
many fonts use a single glyph for all character codes which are
unknown.  Additionally, at least for TrueType and OpenType fonts, it
is basically impossible to get this information if glyph substitution
within glyph contexts is active, as necessary for e.g. Arabic or Indic
scripts.  An extreme example might be that the character `A' maps to
seven glyphs which appear as the string `America'.


    Werner




reply via email to

[Prev in Thread] Current Thread [Next in Thread]