[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: =?UTF-8?Q?Re:_[ft]_glyphs_bitmap=5Ftop_and_=C3=81, =C3=9F, =C3=84_..
From: |
Werner LEMBERG |
Subject: |
Re: =?UTF-8?Q?Re:_[ft]_glyphs_bitmap=5Ftop_and_=C3=81, =C3=9F, =C3=84_...?= |
Date: |
Thu, 19 Feb 2009 09:33:17 +0100 (CET) |
[Your mailer is broken; see the `subject' line]
> Here is te code-snippet where the y-positions are processed:
Uh, oh, it's indeed a simple user error! This is the last time I'll
check code which can't be compiled stand-alone -- and I mean that it
can be executed on the command line, and it doesn't use any platform
specific code.
> glyphIndex = FT_Get_Char_Index( face, txt[n]);
You have never had the idea to check the glyphIndex value, right? For
`Ä' and the like, you get value 0 in your code! Reason: `txt' is
declared as `const char* txt' in `renderString', but
`FT_Get_Char_Index' expects an unsigned value. If you change the line
to
glyphIndex = FT_Get_Char_Index( face, (unsigned char)txt[n]);
you get
processing `Ä': top: 20, height 20
processing `Á': top: 21, height 21
processing `ß': top: 17, height 17
processing `á': top: 17, height 17
Miracle, miracle.
Werner