freetype
[Top][All Lists]
Advanced

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

Re: [ft] Freetype 2.4.4 -> freetype 2.4.12: FT_Get_Advance changed behav


From: Gregor Mückl
Subject: Re: [ft] Freetype 2.4.4 -> freetype 2.4.12: FT_Get_Advance changed behaviour?
Date: Sun, 02 Jun 2013 23:50:31 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

Hi!

I've reduced my code to the attached program (which is still a bit convoluted - sorry!). It is a reduced version of my layouting algorithm. I've shortened it quite a bit, including removing most of the vertical layouting stuff, so there may be some odd things here and there that do not seem to make sense. The core is _TL_CalculateRunWidth, as in the fragment in the previous mail.

It should compile on Linux with gcc (or at least g++ if some C++ism stuck), but I have not yet found the time to test it on that platform. On Windows, it reproduces the bug. If you cannot compile the code or if you have problems recreating the issue, please let me know. Thanks!

For Cantarell Regular (also attached, part of the Google web fonts collection), the program output differs depending on the library version:

Freetype library version: 2.4.4
glyph 0: position (0.000000, 0.000000)
glyph 1: position (12.000000, 0.000000)
glyph 2: position (23.000000, 0.000000)
glyph 3: position (33.000000, 0.000000)

Freetype library version: 2.4.12
glyph 0: position (0.000000, 0.000000)
glyph 1: position (19.187500, 0.000000)
glyph 2: position (36.781250, 0.000000)
glyph 3: position (52.781250, 0.000000)


Regards,
Gregor

On 6/2/2013 9:31 PM, Werner LEMBERG wrote:

I've upgraded a project of mine from using freetype 2.4.4 to
freetype 2.4.12 and now I experience totally broken text layouting
(the layouting code is my own).  Horizontal spacings between
characters are now either far too large or far too small, depending
on the font.  In one case the glyph distances are at least double
what they should be.  None of the tested fonts give anything close
to believable reasults.  Linking against the old version of freetype
without any further code changes fixes this issue.  [...]

Maybe a bug.  I can't see anything strange within your code.

Can you provide a minimum stand-alone example written in C which
exhibits the problem, and which I can compile and debug on my
GNU/Linux box?  If necessary, please send the offending font privately
to me.


     Werner


Attachment: Cantarell-Regular.ttf
Description: Binary data

Attachment: textlayouttext.cpp
Description: Text document


reply via email to

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