freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Severe rendering bug


From: Tobias Ringström
Subject: Re: [ft-devel] Severe rendering bug
Date: Mon, 02 Jan 2012 18:59:10 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

On 12/30/2011 02:52 PM, Werner LEMBERG wrote:

[Tested with 2.25]

I have encountered a severe rendering bug when rendering DejaVu Sans
Book capital R at certain aspect ratios using freetype 2.4.x. It's
very obvious for height 64 and width 256. See the attached image.

This is a bug in the hinting instructions of DejaVu for this glyph.
The setup of the projection vector for the affected IP instructions is
bad.  I suggest that you make a bug report.

I'm certainly not an expert, but I think you might be wrong, and that this actually is a bug in the freetype hinter, specifically in the IP instruction in the face of a non-square font size and non-orthogonal projection vectors. I just investigated this today with no prior knowledge of the hinting language, so I can of course be horribly wrong. The pictures you attached look like output from Fontforge which uses the Freetype hinting engine, so it would of course have the same bugs. The TrueType Viewer Tool on the other hand has its own hinting interpreter, and it does not have any of the problems that I reported.

Looking at the Freetype TrueType interpreter implementation, the projection vector is in pixel space, meaning that the 300% horizontal stretch that I use in my example has been applied.

The problem is that in Ins_IP, the projections are calculated using orus coordinate vectors, which are in em-space (NOT stretched).

If I change from using orus to org, the instruction behaves as I would expect it to from reading the TrueType specification, and there are no artefacts.

It would be great if someone could verify my reasoning, dispute it, or just spread some light in general. Also, and explanation of what orus means would be very welcome bonus. :-)

/Tobias



reply via email to

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