[fpc-pascal] freetype unit + unicode
dle3ab at angelbase.com
Tue Oct 4 09:34:22 CEST 2011
On Mon 3 Oct 2011, Graeme Geldenhuys wrote:
> 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.
I've tried tweaking all kinds of things but the sad truth is that I am really
pathetic at figuring out libraries when no documentation is given, and I sure
can't find any documentation.
I see that the fpgui helloworld program handles unicode nicely. I guess I'll try
and imitate whatever's happening there.
Thanks again, Graeme!
> procedure XftDrawStringUtf8(...); cdecl; external libXft;
> procedure XftDrawString8(...); cdecl; external libXft;
> procedure XftDrawString16(...); cdecl; external libXft;
> - Graeme -
> fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
More information about the fpc-pascal