FontForge Center in Width Command Explained

This article provides a direct overview of the "Center in Width" command in the open-source font editor FontForge. You will learn what the command does to a glyph's horizontal metrics, how it calculates spacing, when it should be applied during font development, and how to execute it efficiently across your font project.

What the Command Does

In typography and digital font design, every glyph sits inside a bounding box defined by an advance width, a left side bearing (LSB), and a right side bearing (RSB). The formula for a glyph’s horizontal footprint is:

\[\text{Advance Width} = \text{Left Side Bearing} + \text{Glyph Width} + \text{Right Side Bearing}\]

The Center in Width command in FontForge automatically balances the left and right side bearings so that they are equal, without changing the glyph's total advance width. It mathematically centers the character's drawn contours within the existing horizontal space allocated to that character.

How FontForge Calculates the Placement

When you invoke Center in Width, FontForge performs a simple mathematical adjustment:

  1. It measures the total advance width of the glyph.
  2. It subtracts the width of the drawn vector contours (the bounding box of the artwork).
  3. It divides the remaining space equally between the left and right side bearings:

\[\text{New LSB} = \text{New RSB} = \frac{\text{Advance Width} - \text{Glyph Width}}{2}\]

The vector outlines are shifted horizontally so that the space before the character matches the space after it.

Common Use Cases

  • Naturally Symmetrical Glyphs: Characters such as H, I, O, X, o, v, and w benefit from mathematically identical margins on both sides.
  • Accents and Diacritics: Non-spacing or spacing diacritics often require exact centering over their base widths to align properly with letterforms.
  • Punctuation and Symbols: Math symbols like +, =, and -, as well as hyphens, bullets, and colons, require equal spacing on both sides to maintain structural balance in running text.
  • Correcting Accidental Shifts: If an outline is inadvertently nudged left or right during editing, Center in Width quickly restores balance without requiring manual numeric entry in the metrics window.

How to Access the Command

You can apply the command to a single glyph or a batch of glyphs:

  1. In the Font View: Select one or multiple glyph slots.
  2. In the Glyph View: Open an individual glyph editing window.
  3. Go to the top menu and select Metrics > Center in Width.

FontForge immediately shifts the contours and updates the LSB and RSB values.

Mathematical Centering vs. Optical Centering

While Center in Width provides perfect mathematical centering, typographers often need to apply visual (optical) corrections afterward. Asymmetrical letters—such as C, L, or T—have unequal distributions of white space. A mathematically centered T, for example, may appear shifted to the right if the stem and crossbar interact unevenly with neighboring characters. Use Center in Width as a fast baseline adjustment, followed by manual spacing reviews to ensure optimal visual rhythm.