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
_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel