Now you can easily generate your own TTF versions of the Terminus font
More than 6 months ago, I wrote about generating TTF versions of the Terminus font (and published mine on that occasion), but I didn’t actually explain how to generate them.
I found the answer to my problem (“How do I get TTF files from the Terminus BDF source files?”) in the FontForge FAQ:
- Create a new font.
- Import the different sizes (one BDF file per font size). Make sure to import the BDF file with the biggest bitmaps into the glyph background!
- Select all glyphs.
- Autotrace them.
- Add extrema.
- Simplify all glyphs.
- Save as TTF.
This process requires the AutoTrace program and FontForge, obviously. While repeating these steps at least two times (for the medium and bold versions of Terminus) is not that hard, I really like to automate things. I also wanted an italic version (I accomplished that by running the BDF files through mkitalic).
Fortunately, FontForge is scriptable! This allowed me to write a script in FontForge’s own “legacy” scripting language (the build I used didn’t support Python scripts…) to perform the steps described above, a small wrapper for AutoTrace to remove the obnoxious borders it adds to the resulting Postscript “images” and a small shell script wrapper that runs mkitalic to produce italic BDF files, tells FontForge to use my AutoTrace wrapper and finally runs the FontForge script for the three different font weights (medium, bold and italic).
Since I had to do some research to obtain the above information, I thought it would be nice to allow other people to easily generate TTF versions of Terminus (mind you, I might lose interest some day!). The scripts I wrote were only tested on unixoid systems (I didn’t test whether they correctly run on Windows, e. g. using Cygwin or CoLinux; they probably do, though).
Get the scripts here: https://github.com/Tblue/mkttf/archive/master.zip.
Also check out my Git repository on GitHub.
Read the included README file for information on how to use the mkttf.sh script. Feel free to post comments (questions, constructive criticism…)!
You might want to use these scripts to generate TTF versions of other fonts than Terminus, too; since the scripts are all fairly generic, it should be sufficient to modify mkttf.sh.