Converting fonts with FontForge using the command line on macOS

FontForge is a powerful tool for creating and editing fonts. It is available for multiple platforms, including macOS, Windows, and Linux, and can be run programmatically from the command line.

On macOS, FontForge is installed in the/Applications/FontForge.app directory. When running FontForge scripts from the command line, the FontForge executable must be used which is located at /Applications/FontForge.app/Contents/MacOS/FontForge.

FontForge scripts can be written either in Python (-lang=py) or using FontForge's native scripting language (-lang=ff or-lang=pe). Another way to specify the scripting language is to set the FONTFORGE_LANGUAGE environment variable.

Below is a complete example of using the FontForge CLI to convert a TTF font to an SVG font that relies on FontForge's native scripting:

/Applications/FontForge.app/Contents/MacOS/FontForge -lang=ff -c 'Open($1); Generate($2)' my-font.ttf my-font.svg

See also

pol·y·glot Poster
$14.99

A poster featuring the word "pol·y·glot".

月 (tsuki) Character Poster
$12.99

A poster featuring the 月 (tsuki) kanji character.

semantics IPA Transcription Poster
$14.99

A poster featuring the phonetic transcription of "semantics" in the International Phonetic Alphabet (IPA).

Поволжье Morphemic Analysis Poster
$14.99

A poster featuring the morphemic analysis of the Russian word Поволжье.

Big Mongolian Words
$29.99

A collection of large-format Mongolian words.

Awesome typography

A curated list of awesome resources on typography.

Typography quotes

A collection of quotes about typography.

Typographers and type designers pronunciation guide

A pronunciation guide to the names of typographers and type designers.

Awesome fonts

A collection of awesome font designs.

Fonts pronunciation guide

A pronunciation guide for the names of fonts.

All prices listed are in United States Dollars (USD). Visual representations of products are intended for illustrative purposes. Actual products may exhibit variations in color, texture, or other characteristics inherent to the manufacturing process. The products' design and underlying technology are protected by applicable intellectual property laws. Unauthorized reproduction or distribution is prohibited.