[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] How do you active a charset ?
From: |
Werner LEMBERG |
Subject: |
Re: [Devel] How do you active a charset ? |
Date: |
Tue, 08 May 2001 14:51:04 +0200 (CEST) |
> Could any one tell me what API (if any) I could use to inorm the
> FreeType engine of the currently selected character set.
>
> For Instance if toggle between input locales LANG :: English(Layout
> US) and LANG :: Japanese(Keyboard Layout Japanese) How do I inform
> FreeType that the charset is now 0x80 instead of 0x00(English)
[I'm talking about FreeType 2]
FreeType doesn't know anything about character sets. There are two
methods to access glyphs: directly and with an encoding to map
character codes to glyph indices. To use the former, simply specify
the glyph index to FT_Load_Glyph(). For the latter, FreeType
predefines some encodings; please read the documentation of
FT_Encoding. With MS Windows you should normally use
ft_encoding_unicode with FT_Select_Charmap(). A call to
FT_Get_Char_Index() converts the input character code to a the glyph
index which can then be fed into FT_Load_Glyph().
Werner