fontforge/fontforge — pull request #1708 by tshinnic (2014-09-01 23:10:55+00:00)
Title: SVG circle/ellipse elements constructed correctly

See #1702 "SVG import: Fontforge adds a ton of extra points whenever
circles are involved" for additional discussions and illustrations.

Imported SVG circle and ellipse elements were being implemented using
quadratic bezier splines, which is known to be incorrect, as cubic
beziers are needed to even approximate these curves. As part of using
quadratics, the control points were spaced too widely apart and thus
were flattening sections of the curves.

`fontforge/svg.c` routine `SVGParseEllipse()` is changed to use cubic splines.
Additionally the control point distances are determined using a magic
constant from formulas described on the web that give a very good
approximation to the desired curves when using only 4 splines.

Investigation finds that the existing UI circle curve drawing feature
within FF already uses cubics (and showing that quadratics were rejected
as inadequate) and use of a number near to the ideal magic constant.
(`fontforgeexe/cvshapes.c` :: `CVMouseDownShape()` and `struct ellipse3`)

And strangely, this fix using cubics and corrected control points makes the
other problems noted in #1702 disappear. Noted without obvious explanation.

Closes #1702