freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Truetype charmap matching algorithm


From: Vincent Caron
Subject: Re: [Devel] Truetype charmap matching algorithm
Date: Wed, 14 May 2003 14:59:04 +0200 (CEST)
User-agent: SquirrelMail/1.4.0

stephenfung said:
> I am working on algorithm of
>
> input: unicode of character
> output: the glyph of that character (ie the location of that glyph in
> TTF, say)

FT_Get_Char_Index() will do the translation for you (character code -> glyph 
index),
provided that you select the proper charmap (ie. 'translation table'). FreeType 
will
automatically select the Unicode charmap upon loading if one is found, in this 
case
FT_Get_Char_Index() should work as is for you. If the font does not come with a
Unicode charmap, you'll have to manage conversions on the fly from Unicode to 
the most
common charmaps (Latin1, MacRoman, etc). See FT_Set_Charmap() and 
FT_Select_Charmap().




reply via email to

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