freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] preliminary analysis of the problem with cubic spline optimis


From: Graham Asher
Subject: [ft-devel] preliminary analysis of the problem with cubic spline optimisation
Date: Sun, 29 Aug 2010 11:31:22 +0100
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)

The aim is to draw a straight line between the start end end of a cubic spline, instead of rendering the curve correctly, if the curve deviates by less than a certain value from the straight line. The code in gray_render_cubic in ftgrays.c checks only the midpoint of the curve. However, this is not necessarily the furthest point from the straight line. If the sequence start, control1, control2, end is not monotonic in one of the dimensions x, y, an s-shaped curve is produced with points further from the line than the midpoint, which may even lie on the line. This situation occurs in 's' for the sample font.

With this information I can easily produce a fix, simply by testing for non-monotonicity and disabling the optimisation in such circumstances, but I shall see if I can up with something slightly better.

Graham




reply via email to

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