freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Working with Shift-JIS encoded characters?


From: Werner LEMBERG
Subject: Re: [Devel] Working with Shift-JIS encoded characters?
Date: Tue, 30 Jul 2002 06:18:52 +0200 (CEST)

> I am using FreeType v2.1.2 on Linux and Windows,

Due to rotation problems you should later on upgrade to 2.1.3 as soon
as it is available.

> I am calling FT_Select_Charmap with ft_encoding_sjis and it is
> succeeding.

This means your font has an SJIS cmap, good.

> However, it is unclear to me what I need to pass to FT_Get_Char_Index to
> get the correct glyph id.  The string (in hex) that I am trying to
> render is:
> 
> 8D C5 8F 89 82 C9 89 7B 97 97 82 B3 82 EA 82 BD 83 79 81 5B 83 57

Hmm, I would say this is

  最初に閲覧されたページ

  8DC5 8F89 82C9 897B 9797 82B3 82EA 82BD 8379 815B 8357

instead, since SJIS is is a mixed 1byte/2byte encodings (with 1byte
char codes in the range 0xA1-0xDF).  Simply use `0x8dc5', `0x8f89',
etc., as the input values for FT_Get_Char_Index!


    Werner



reply via email to

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