freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] German umlauts with Freetype 2?


From: David Turner
Subject: Re: [Devel] German umlauts with Freetype 2?
Date: Thu, 26 Dec 2002 10:56:59 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2a) Gecko/20020910

Hello Patrick,

Patrick Hoffmann wrote:
Hi folx,
I'm programming a user interface for an automat (that exchanges money
- but that doesn't really matter). I'm using the freetype engine to
display true type fonts with the svgalib. But when I use german
umlauts only a square is displayed instead of the right letter. So I
may be right if I think this means, that I'm not using the correct
character code. But which code should I use? Is there a possibility to
change this behaviour with FT_Set_Charmap and FT_Encoding? Does
somebody know a solution for this problem?
I'm programming under linux. Thanx.. hope somebody can help me out!

Are you sure you're passing the value "0xDF" to FT_Get_Char_Index
to retrieve the glyph index ?

On some systems, "char" is considered signed by default, which means
that code like the following:

  const char*  my_string = "ça va là ?";
  const char*  p;

  for ( p = my_string; *p; p++ )
  {
    gindex = FT_Get_Char_Index( face, *p );
    ...
  }

will not work correctly, because the "*p" will expand to negative
values for accented characters... FT_Get_Char_Index always convert
these to glyph index 0, which often is a little square to indicate
a missing/incorrect glyph..

Otherwise, you'll need to tell us more about the font you're
using + freetype version + compiler + platform, etc...

Hope this helps,

- David Turner
- The FreeType Project  (www.freetype.org)




reply via email to

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