freetype
[Top][All Lists]
Advanced

[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:33:43 +0900
User-agent: Thunderbird 2.0.0.6 (Windows/20070728)

suzuki toshiya wrote (2008/08/27 22:25):
>> 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").

I slipped to note why you can use UCS-4 but
you cannot UTF-8. As I've written in previous
post, FreeType2 does not have the convertor
of character encoding, even if it's simple
mathematics (like UTF8 <-> UCS-4). So, "what
kind of character encoding is available?"
is completely defined by the contents of font
file. At present, TrueType fonts supports
UCS-2, UCS-4, Shift-JIS, GB 2312, Big 5,
Wansung, etc, but no support for UTF-8.
So, you cannot use UTF-8 to lookup a glyph
in Japanese TrueType font.

Regards,
mpsuzuki




reply via email to

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