FontForge brand fonts: why changeWeight failed and offset outlines worked
说明与用途
使用 FontForge 的 Python 脚本将内置的 changeWeight 替换为手动轮廓偏移和 miter 连接,生成更粗但角度更尖锐的字体,同时遵守 OFL 许可证规则。
问题
Existing free fonts needed a slightly heavier version with sharp corners, but built‑in weight change produced poor results.
结果
The offset‑outline method produced heavier, sharper fonts with minimal distortion, while the built‑in changeWeight failed.
工作流
- Install FontForge Python bindings via apt
- Write 82‑line script to open source font, loop glyphs, modify outlines, rename, write .otf/.ttf, render specimen with Pillow
- Attempt v1: use glyph.changeWeight() with 3%/3.4% weight and tighten spacing
- Observe poor output: clogged counters, nicked terminals, letters kissing
- Implement v2: removeOverlap, stroke outline with circular pen, butt caps, miter joins, keep outer band, merge back, removeOverlap again
- Apply small weight (1%/2%) to preserve shape
- Add chamfer cuts to straight‑line corners meeting angle criteria
- Perform housekeeping: correctDirection, addExtrema, round, adjust side bearings
- Rename font properly, strip old name table entries, append license notice
- Ship modified font with full OFL 1.1 license file
- Deploy iC Volt on tech site and newsletter; C1 Cut not yet used
证据
FontForge has a built‑in for this, glyph.changeWeight(). One call per glyph, give it a stroke amount, job done.
It just looked rubbish. The heavy Anton one clogged up, the holes in R, G and 8 nearly closed.
What I actually wanted was "the same letter, a bit fatter, corners still sharp".
v2 also uses way less weight: 1% of the em on C1 Cut, 2% on iC Volt.
Both source fonts are under the SIL Open Font License 1.1.
- 记录日期: 2026-10-22T09:11:13.752Z