Merge Contours into Compound Path in FontForge
Merging multiple separate contours in FontForge depends on whether you want to combine overlapping shapes into a single outline, cut inner shapes out of outer shapes to create a compound path, or connect open path segments at their endpoints. In digital type design, any set of closed contours within a single glyph layer acts as a compound path by default. This guide covers how to unite overlapping paths, properly configure inner cutouts using path direction, and join open contours into a single continuous outline.
Combining Overlapping Contours (Union)
If your contours overlap and you want to fuse them into a single continuous outline:
- Open the glyph in the FontForge Outline View by double-clicking it in the font grid.
- Select the contours you wish to combine using the Pointer tool, or
press
Ctrl + A(Cmd + Aon macOS) to select all shapes in the glyph. - Navigate to the top menu and select Element > Overlap
> Remove Overlap (or press
Ctrl + Shift + O). - FontForge will calculate the intersections, delete the internal segments, and output a single fused contour.
Creating Compound Cutouts (Holes and Counters)
If you have separate shapes where one exists inside another (such as the outer boundary and the inner hole of the letter "O"):
- Ensure both contours are fully closed and exist in the Foreground layer of the same glyph window.
- Select both the outer and inner contours.
- Go to Element > Correct Direction (or press
Ctrl + Shift + D). - FontForge relies on the Non-Zero Winding Rule or Even-Odd Rule to render cutouts. Running Correct Direction ensures outer paths run clockwise (or counter-clockwise, depending on font format) and inner cutout paths run the opposite direction, creating a proper compound path with transparent counters.
Joining Open Path Segments
If you have separate open line segments that you want to connect into a single closed or continuous path:
- Use the Pointer tool to select the two open endpoints that need to be linked.
- Go to Edit > Join (or press
Ctrl + J). FontForge will bridge the two points with a straight line segment. - Alternatively, drag one endpoint directly over the other and select Point > Merge Points to weld them together.
- Repeat this process until the path is fully closed.