How to Scale Line Weights Uniformly in FontForge

Scaling line weights uniformly across all characters in FontForge is entirely possible using the software's automated style transformations and scripting interface. This guide details how to adjust stroke thickness globally using the Change Weight command, how to expand single-stroke paths, and how to ensure your glyph outlines remain clean and correctly spaced after scaling.

Method 1: Using the Change Weight Tool (Standard Outlines)

For traditional, closed-path glyphs, you can globally increase or decrease stroke thickness using FontForge's built-in algorithm.

  1. Select All Glyphs: Open your font file, click into the Font View window, and press Ctrl + A (or Cmd + A on macOS) to select every character.
  2. Open the Weight Dialog: Go to the top menu and select Element > Style > Change Weight...
  3. Configure the Transformation:
    • Embolden / Thin: Choose whether you are adding or subtracting weight.
    • Stroke Width: Enter the exact value in font units by which you want to adjust the contours. Entering a uniform value for both horizontal and vertical offsets expands the outline evenly.
    • Counters: Choose whether to scale the internal counters proportionately or keep them fixed. For uniform geometric expansion, leave counter scaling balanced with the stroke width.
  4. Apply: Click OK to run the batch modification across all selected glyphs.

Method 2: Using Expand Stroke (Skeletal or Single-Line Fonts)

If your glyphs consist of open, single-path skeletons rather than filled outlines, use the stroke expansion tool to apply an identical thickness to every line.

  1. Select all target glyphs in the Font View (Ctrl + A).
  2. Navigate to Element > Expand Stroke...
  3. Set the desired Stroke Width in units.
  4. Set the Cap Type (Butt, Round, or Square) and Join Type (Miter, Round, or Bevel) to define how corners and endpoints resolve.
  5. Click OK to convert the single paths into filled, uniform outlines.

Method 3: Automating with a Python Script

For programmatic uniformity and repeatability across multiple font files, use FontForge’s integrated Python engine.

  1. Go to File > Execute Script...
  2. Enter the following script to iterate over every glyph and apply an exact, uniform offset:
import fontforge

font = fontforge.activeFont()
font.selection.all()

# Apply weight transformation: changeWeight(stroke_width, "type", ... )
for glyph in font.selection.byGlyphs:
    glyph.changeWeight(20)  # Adjust the integer for desired unit change
    glyph.removeOverlap()
    glyph.correctDirection()

Essential Post-Scaling Steps

Changing stroke weights alters geometric paths and character boundaries, requiring the following clean-up steps across all selected glyphs:

  • Remove Overlaps: Expanding weights often causes contours to intersect. Go to Element > Overlap > Remove Overlap (Ctrl + Shift + O) to merge self-intersecting paths into clean shapes.
  • Correct Direction: Path orientation can invert when contracting or expanding outlines. Choose Element > Correct Direction (Ctrl + Shift + D) so that inner cutouts remain negative space.
  • Adjust Metrics: Increasing line weight reduces the white space between letters. Open Metrics > Auto Width... or manually recalculate your left and right side bearings to account for the newly added stroke thickness.