[fpc-pascal] freetype unit + unicode

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Oct 4 08:51:37 CEST 2011


On 03/10/2011 21:51, David Emerson wrote:
> I am using the freetype unit (with linux) and would like to display some 
> interesting unicode characters. However when I pass a string containing say 
> U+2265 to GetStringGray, it doesn't display the unicode character at all; it 
> shows 3 other characters in its place. What to do?

What freetype API function are you calling? Not sure if it applies to
freetype, but with Xft (as implemented and used in fpGUI), there are
various versions of the same API. You need to call the correct one based
on the encoding type of you text.

procedure XftDrawStringUtf8(...); cdecl; external libXft;
procedure XftDrawString8(...); cdecl; external libXft;
procedure XftDrawString16(...); cdecl; external libXft;


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/




More information about the fpc-pascal mailing list