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: Tue, 03 Jan 2012 11:19:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

On 01/02/2012 10:40 PM, Werner LEMBERG wrote:

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.

Can you prepare a patch, please?  I currently don't have the time to
really delve into this issue, but maybe `orus' is correct, but should
be scaled properly...

The difference between org and orus is that org has rounding errors caused by the scaling to 26.6 fixed point pixel coordinates, so scaling orus seems to be more correct, although I struggle to see how it could matter in practice. But since the rest of the code really likes to use orus, it's best to keep using it in IP as well I suppose.

The attached patch fixes the bug, and does not change the case where x_scale and y_scale are equal, so it should be quite safe and not introduce any new bugs.

Please review this patch and consider it for inclusion in the next release of Freetype.

/Tobias

Attachment: freetype-scaled-IP.patch
Description: Text Data


reply via email to

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