Chapter 2. Converting a font

Table of Contents

Initial tour of the Fontforge interface
Starting up Fontforge
The interface
Basic Tasks with Fontforge
Opening, Saving and Exporting Fonts
Copying, Pasting and Cutting Glyphs.
Rotating, Shifting and Scaling Glyphs
Indic Fonts with Fontforge
Choosing a font and getting the glyphs
Getting the glyphs in place
Adding the substitution tables
Adding the Positioning Information

This chapter deals with the actual process of converting older fonts into Unicode compliant Open Type Fonts. In a nutshell, the entire process consists of three steps

Of course, then you have to test the font, and when you are satisfied with the font, you must package it and release it so that people can actually use it. I will be dealing with the first three steps in this chapter, and will describe the testing and release process in Chapter 3.

The tool you will be using is called FontForge - which is freely downloadable from . FontForge is Free (as in free speech) and is licensed under a license which is very much similar to the revised BSD license.


Fontforge was earlier known as Pfaedit - so don't be surprised to see an application called Pfaedit which looks similar to Fontforge.

Debian users may install Fontforge by issuing the command apt-get install fontforge and Gentoo users may install it with the command emerge fontforge If you are on any other distribution, go to the Fontforge website and latest binary. If you are using a RPM based system (like Redhat, Fedora, SuSE, Mandrake, etc) - you can download the Fontforge RPM file and install it with the command rpm -ivh fontforge-<version>.rpm Users of systems like Slackware, Linux From Scratch can either compile Fontforge from scratch, or use tools like rpm2targz to extract the binaries from the RPM package.


However, during installation, remember that you will need to be root. If you don't have root access, you can install the binary locally in ~/bin, but that is I wouldn't recommend it.

Fontforge also runs on Microsoft™ Windows and Mac OSX™, but I haven't tried it on these platforms yet - if you have, feel free to add to this document and send me the diff file :).

Initial tour of the Fontforge interface

This section covers starting up Fontforge, and guides you through the main elements of its interface.

Starting up Fontforge

Fontforge does not have a menu entry. So, you have to start up manually using Xterm or any other similar Terminal application. To do so, fire up Xterm or GNOME-Terminal or Konsole or your favourite X terminal emulator and type the following command fontforge and Fontforge will startup. It will open up a file chooser dialog, which will let you open up a font for editing, or start a new font project.


If you want to avoid the file chooser dialog (which can be irritating after sometime), you can either use the command fontforge -new which would start up fontforge with a blank font, or, the command fontforge <font_filename> which would open the specified font (you will need to specify the path to the physical fontfile.

I usually use a menu entry to startup Fontforge quickly. To have a entry in my GNOME menu, I put a file called fontforge.desktop in my /usr/share/applications directory. The contents of that file is listed below.

[Desktop Entry]
Name=Character Map

The interface

A font editor is not what you use everyday - and so, before jumping into the world of Indic fonts, you need to be aware of the basics of Fontforge.

The Font View

Fontforge opens up with what is called the "Font view" - a list of all the glyphs in the open font.

Figure 2.1. Font View

Font View

Font View in Fontforge

The glyphs are initially displayed at a 24 pixel size, and the first thing that I usually do is increase this size to 48 pixels by clicking on View->48 pixel outline . You should also enable glyph anti-aliasing by clicking on View->Anti Alias .

You can navigate through the glyph list with the arrow keys, as well with the scroll bar. You can also navigate between adjacent glyphs with the help of the Tab or the Shift-Tab keys.

On top of each glyph, usually its representative form from a standard font is displayed. When you select a particular glyph, its name, description (human readable) and codepoint is displayed on top of the font view (just below the menubar). The same information is displayed as a tooltip when you hover the mouse over a particular glyph.

The Outline View

When you double click on a particular glyph in the font view, you will be presented with the "Outline View" of the glyph. Anyone who has used tools like the GIMP or Xfig should find the interface of the outline view familiar.

Figure 2.2. Outline View

Outline View

Outline View in Fontforge (taken from the Fontforge documentation)

The outline view is used mostly for editing the glyphs. We will be coming back to the outline view later in this chapter. For the time being, just note the two vertical lines in the outline view. The leftmost line denotes the position where x=0 (yeah! coordinate geometry) for the glyph, and the line in the right (adjustable by "dragging") denotes the width of the glyph.