Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (33 sloc) 2.06 KB

mkttf: BDF to TTF conversion

The script converts a set of BDF files into a TTF file, automatically generating the required scalable outlines (actually, any font format supported by FontForge is accepted). Call it with the -h option for usage help.

The script generates medium (normal), bold and italic versions of the Terminus font. It will create three directories ("Normal", "Bold" and "Italic") in the current working directory.

To use, you need the following tools installed in your PATH:

  • FontForge: This tool and its Python extension enable me to modify the font using Python. You need a version that has Python support enabled (i. e. provides a Python extension).
  • Potrace: To generate the scalable outlines.
  • A recent version of Python. Whether you have to choose Python 2 or Python 3 depends on how your version of FontForge was built: FontForge can either be built with support for Python 2 or with support for Python 3. supports both versions.

To use, you additionally need the following programs in your path:

  • Obviously, you need a POSIX-compliant shell.
  • mkitalic: To generate the italic font.

The script takes two mandatory arguments:

  1. The directory containing the Terminus BDF files. The italic versions of the BDF files will be placed there.
  2. The font version which will be included in the file names of the generated files and in the font files themselves (so it can be e. g. shown to the user).

All other arguments are passed directly to

Additionally to generating TTF fonts, the script will also generate an SFD file (FontForge's native file format) for each font weight so that the generated fonts can be easily modified, if necessary.

If you want to generate TTF versions of other fonts, you should only need to modify -- the script is completely generic.

Have fun!