1 Aug 2005 09:53
Re: [ft] Re French accents & Freetype2 :)
Mahendra Tallur <listes <at> mahen-fr.net>
2005-08-01 07:53:36 GMT
2005-08-01 07:53:36 GMT
> when using ft2, trying to display some text in iso 8859-1 encoding, the
> French accents don't get displayed - I get empty boxes instead.
OK, so when keeping the most important bits, here is basically what I do
- in other word, I don't select another Charmap, because I can't find an
iso 8859-1 one, just unicode...
FT_Library library;
FT_Face face;
if ((error = FT_Init_FreeType( &library )))
{
*ierr=2;
return(-1);
}
if ((error = FT_New_Face( library, font, 0, &face )))
{
*ierr=3;
return(-1);
}
(...)
glyph_index = FT_Get_Char_Index(face, text[i]);
failure |= FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT );
failure |= FT_Render_Glyph(face->glyph, ft_render_mode_normal );
(Continue reading)
RSS Feed