[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] How to get a glyph index of Japanese charactor
From: |
suzuki toshiya |
Subject: |
Re: [ft] How to get a glyph index of Japanese charactor |
Date: |
Wed, 27 Aug 2008 22:25:15 +0900 |
User-agent: |
Thunderbird 2.0.0.6 (Windows/20070728) |
Hi,
Hongyu Zhang wrote (2008/08/27 20:10):
> I am using the default FT_ENCODING_UNICODE charmap which contains Japanese
> font.
Basically it's OK. Some legacy fonts designed for classic MacOS
have only Shift-JIS encoding (no Unicode encoding interface),
but most fonts produced recently have Unicode interfaces.
In such case, you have to use some character encoding conversion
library (e.g. iconv). FreeType2 does not provide encoding conversion
mechanism.
> When I set the charcode to be its binary code (eg. 0xE38193), glyph index 0
> is returned.
Hmm, I'm not sure what the encoding you wanted use.
Regarding the 24bit length of 0xE38193, I guess you
wanted to use UTF-8. Please try UCS-4 codepoint
(e.g. 0x00003042, the UCS-4 codepoint of hiragana "A").
Regards,
mpsuzuki