oreohawk.blogg.se

Fontforge line break
Fontforge line break






The algorithm works as described in the first post of this issue. Meanwhile, I have modified the function ApproximateSplineFromPointsSlopes and removed the now obsolete functions in splinefit.c. Now it really should follow the description that is already given here.) (I have updated the plugin because I had implemented a small part which made the error calculation faster but worse in some situations. It seems to work okay (only the User Interface function is bad).Įxample font and Python plugin in mergebezier.zip I have made a quick Python plugin to test the algorithm.

  • for each of the original 9 points find the smallest squared distance to the 99 points the sum of the squared distances is the error.
  • calculate more (99) points inbetween the start and the end point of the approximation contour.
  • calculate few (9) points inbetween the start and the end point of the original contour.
  • If you want you may use my algorithm: I have varied the handle lengths until the error of the approximation contour has become minimal. But because FontForge's contour are not parameterized by arc length, this assumption is bad.

    fontforge line break

    The main problem of FontForge's algorithm IMHO is the assumption that the point at time t of the approximation contour is near the point at time t of the original contour. I think splinefit.c and the ApproximateSplineFromPoint* methods are responsible for "Merge". If several segments are to be merged, FontForge's algorithm (right) is even worse in comparison with my algorithm (left): (only the upper right segments have been merged) The following image shall illustrate this inaccurateness:

    fontforge line break

    When using "Merge" in FontForge, the resulting merged curve is quite inaccurate in many cases.








    Fontforge line break