Draft (hidden)

Converting from cubic to quadratic using a script

The script below converts all glyphs in the current (cubic) font to quadratic.

The conversion is made using RoboFont’s cubic-to-quadratic algorithm, which adds an implied on-curve point and splits each curve segment in two.

from lib.tools.bezierTools import curveConverter

f = CurrentFont().naked()

for g in f:

f.segmentType = g.segmentType

Converting to quadratic with QuadraticConverter

QuadraticConverter is a RoboFont extension to convert from cubic to quadratic contours. It provides some options and a live preview to fine-tune the result.

QuadraticConverter can be installed with Mechanic 2.

Once installed, the QuadraticConverter dialog can be opened from the Extensions menu:

Use the sliders to adjust the Maximum Distance and Minimum Segment Length parameters.

If a glyph window is open, a live preview will be displayed for the current glyph.

Click on Convert Font to convert all glyphs in the current font to quadratic, and save the result as a new UFO file.

Last edited on 02/06/2020