« Terminus (TTF) v4.32 releasedKleinere Designänderungen »

Now you can easily generate your own TTF versions of the Terminus font

28/08/10 09:19:15 pm, by Tblue Email   English (GB) latin1
Categories: Software, English posts, Entwicklung, Linux

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: http://files.ax86.net/terminus-ttf/mkttf.tar.bz2.

Please note that this archive might not be up-to-date (it will be updated to make sure everything works, though) – if you think you need the bleeding-edge version, check out my Bazaar repository on Launchpad.

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.

Have fun!

Stoppt die Vorratsdatenspeicherung! Jetzt klicken &handeln! Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos
und Materialien: