Tank San | 3 Nov 2011 15:08
Picon
Favicon

[ft] Re1:

hello dear friend
http://caribbeanrentavilla.com/index135tww--.php?ecitrankpage=26


            Thu, 3 Nov 2011 15:08:38
______________
"Hooper, and they know more than you think; all that is needed to make this job complete." (c) Sallyann waawww
_______________________________________________
Freetype mailing list
Freetype <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype
Gregor Mückl | 5 Nov 2011 18:08
Picon

[ft] FT_Get_Advance spuriously returns advance 0

Hi!

I think I'm in need for some hints in order to track this one down. 
Here's the problem:

I've run into a problem with text layouting engine that I've written 
based on Freetype. For some reasons, FT_Get_Advance sometimes returns an 
advance of 0 without reporting an error, while when called again later 
on, it does return the correct value for the same character within the 
same string. When it happens, it happens multiple times for consecutive 
characters. Each time the text layout is regenerated, the font size is 
changed to the same value using FT_Set_Pixel_Sizes if required, before 
any calls to FT_Get_Advance are made. I am fairly confident that the 
font-related state that I can control is the same each time 
FT_Get_Advance is called.

Peculiarly, on each run of the program, the same glyphs are affected - 
on both platforms that I can test the program on: On Linux with Freetype 
2.4.6 and GCC 4.5 and with Visual Studio 2010 on Windows 7 (don't know 
the exact version of Freetype there ATM). Valgrind does not report 
anything serious, esp. no out of bounds memory accesses.

Do you have any ideas where I should start looking for the cause? 
Anything obivous that I might have missed? Comments and questions for 
more information are welcome :).

Regards,
Gregor
Werner LEMBERG | 5 Nov 2011 19:32
Picon

Re: [ft] FT_Get_Advance spuriously returns advance 0


> I think I'm in need for some hints in order to track this one down.
> Here's the problem: [...]

No idea what's causing this.  To help you, please provide a small
compilable sample to the list which exhibits the problem, and which I
can debug.  If you need a proprietary font to reproduce the error
please send it to me and not to the list.

    Werner
Gregor Mückl | 6 Nov 2011 14:23
Picon

Re: [ft] FT_Get_Advance spuriously returns advance 0

On Sat, 05 Nov 2011 19:32:05 +0100 (CET), Werner LEMBERG wrote:
>> I think I'm in need for some hints in order to track this one down.
>> Here's the problem: [...]
>
> No idea what's causing this.  To help you, please provide a small
> compilable sample to the list which exhibits the problem, and which I
> can debug.  If you need a proprietary font to reproduce the error
> please send it to me and not to the list.
>
>
>     Werner

Thanks for the offer. But I think I found the cause: I passed the 
FT_Font structure that the Layouter was using also to cairo for 
rendering. And rendering in cairo did in fact change something inside 
the font. Now I'm loading the font twice to get separate font structures 
and the problem is gone.

Gregor

Gmane