freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Japenese OTF font with funny encoding


From: Werner LEMBERG
Subject: Re: [ft-devel] Japenese OTF font with funny encoding
Date: Tue, 01 Jan 2008 11:00:07 +0100 (CET)

> For ftface->charmaps[1]
> encoding=0(!!) platform=1 encoding_id=1 (iterating using
> FT_Get_First/Next_Char yeilds 8589 chars).

Hmm, PID/EID 1,1 is Japanese on a Mac, so FreeType is correct in
saying that encoding = FT_ENCODING_NONE because it doesn't contain
mapping tables.

> This font works with OS X applications, so I wonder how do I
> determine what the encoding is for "0" in this case?

Value `0' means that FreeType can't handle it, not that it is an
unknown encoding!  You have to use other means handle the encoding,
for example, looking at the PID/EID pair directly.

> The charcodes that FT_Get_First/Next_Char yields ranges from 0-128,
> 33088->40956 and 57408->60924.
>
> Looking at the characters, it _looks_ like they are Shift-JIS
> encoded.

Yes.  I'm quite sure that Japanese for older Macs is always encoded in
SJIS.  However, you should look up the Mac documentation to verify
this.

> How would I determine that programatically using FreeType?

You can't.

> Second, can I supply a synthetic charmap somehow to synthesis a
> Unicode table, or do I need to convert my Unicode to Shift-JIS and
> just use the existing charmap?

The latter.


    Werner




reply via email to

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