[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] charmap encodings
From: |
Werner LEMBERG |
Subject: |
Re: [Devel] charmap encodings |
Date: |
Mon, 07 Jul 2003 08:30:06 +0200 (CEST) |
> I'm confused about what charmap to select for fonts that doesn't
> contain an ASCII, Latin-1, or Unicode charmap, for example
> 'wingdings'. My application needs to produce glyph images of the
> font. Why is it that i get correct images when i select
> FT_ENCODING_APPLE_ROMAN and incorrect images when selecting
> FT_ENCODING_MS_SYMBOLS. Both these charmaps are present in the font
> file.
Because Microsoft uses an ugly hack: You have to add 0xF000 to the
character code if FT_ENCODING_MS_SYMBOLS is active.
> Simply put; how do i determine which encoding to use from the
> platform_id and encoding_id (given by face->charmaps[n]->platform_id
> and face->charmaps[n]->encoding_id)
You shouldn't do that in general. Only the SFNT format has the
PID/EID pair to identify the encoding. For other formats we have to
emulate it. You should use FT_ENCODING_XXX where possible. If this
really doesn't help look into `ttnameid.h'.
Werner