freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] render greek characters


From: Antoine Leca
Subject: Re: [Freetype] render greek characters
Date: Wed, 21 Jul 2004 17:58:33 +0200

On Wednesday, July 21, 2004 4:09 PM Stathis va escriure:

> What I did initially was to hardcode
> the text in greek like char* text = "κειμενο" and set the charmap to
> Unicode.

Unless you have a special setup where "char" are really Unicode characters
(and then I am sure you'll not ask for help this way ;-)), this cannot work.

Your characters in the text string are, depending of your setup, either
single byte Greek characters (in iso-8859-7 or win1253 or some IBM/MS
codepages like 737 or 869: pick the one you seen most recently), or
multi-byte characters encoded with something like UTF-8 (like they are in
the message I am just sending). In either case, you need to massage them a
bit to obtain (an array of) Unicode codepoints to pass to FT_Load_Char,
which expects indices in the 0x380-0x3CF range.

Perhaps mbtowc() (or mbstowcs) can help you. Or a call to
MultiByteToWideChar.


Antoine




reply via email to

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