Cubic vs Quadratic Splines in FontForge

In digital typography, outline curves are mathematically defined as either cubic or quadratic Bézier splines. FontForge supports both types natively, allowing type designers to create, edit, and convert between them depending on whether the target output is a PostScript-based OpenType font or a TrueType font. Understanding the mathematical differences, editing behaviors, and conversion mechanics of these two spline formats within FontForge is critical for optimizing glyph outlines and preventing interpolation errors during font production.

Mathematical Differences

The core difference between cubic and quadratic splines lies in the number of control points used to define a curve segment:

  • Quadratic Splines (2nd Degree): Defined by two on-curve endpoints and a single off-curve control point. This format is the native standard for TrueType outlines (.ttf). Because there is only one control handle to pull the curve, complex shapes require more segments and more on-curve points to achieve smooth transitions.
  • Cubic Splines (3rd Degree): Defined by two on-curve endpoints and two independent off-curve control points. This is the native standard for PostScript, OpenType-CFF (.otf), and SVG fonts. The presence of two control handles allows for S-curves and asymmetrical curvatures within a single segment, requiring fewer overall points to define complex shapes.

Spline Handling in FontForge

FontForge allows an entire font database to be set to either Cubic or Quadratic mode via Element > Font Info > Layers.

Cubic Mode (Default)

Most type designers work primarily in cubic mode. In this environment, FontForge provides two handles for every curve segment, corresponding to the two off-curve control points. Designers have precise control over incoming and outgoing tangents at every node. FontForge categorizes points as curve points, corner points, or tangent points, automatically constraining cubic handles to maintain smoothness where necessary.

Quadratic Mode

When switched to quadratic mode, FontForge changes how control points are displayed and manipulated. Adjacent off-curve points can imply an on-curve point midway between them—a standard TrueType optimization. FontForge allows you to edit these implied points directly or manipulate the control handles, though dragging a single control point affects the curve segments on either side if the points are linked.

Conversion Mechanics

FontForge handles conversions between cubic and quadratic curves differently due to the underlying mathematics:

  • Quadratic to Cubic (Lossless): Converting from quadratic to cubic is mathematically exact. FontForge can elevate the degree of any quadratic curve to a cubic curve by calculating new control point positions without changing the physical shape of the outline or adding extra on-curve points.
  • Cubic to Quadratic (Approximation): Converting from cubic to quadratic cannot be done with absolute precision without increasing the point count. Because a quadratic spline cannot bend as flexibly as a cubic spline, FontForge must approximate the shape by splitting single cubic segments into multiple quadratic segments. FontForge uses an error tolerance setting to determine how many additional points are required to keep the shape visually identical to the original.

Best Practices in FontForge

  1. Design in Cubic: Create glyphs in cubic mode. It is more intuitive, requires fewer points, and offers standard tools found in vector editors like Adobe Illustrator.
  2. Convert at Export: If generating TrueType fonts, let FontForge automatically handle the cubic-to-quadratic conversion during the font generation process.
  3. Manual Conversion for TrueType Hinting: If you plan to execute manual TrueType hinting within FontForge, convert the layer to quadratic beforehand (Element > Font Info > Layers) and manually audit the added points to ensure optimal placement on extreme horizontal and vertical coordinates.