Basic Tasks with Fontforge

Before starting on an actual font, you must become familiar with some of the basic operations of Fontforge.

Opening, Saving and Exporting Fonts

Though Fontforge can open a variety of font formats (Truetype, Opentype, Postscript, BDF, etc), it usually stores the fonts in a format with the extension *.sfd (Spline Font Database). To open a font (or a *.sfd file, you can simply start Fontforge without any argument, and you will be presented with a file chooser dialog. You can also use File->Open to open files.

Figure 2.3. File chooser

File chooser

The file chooser in Fontforge

To save files, simply use File->Save as . This saves the font being edited as a *.sfd file.

However, to get an actual usable font, you must use File->Export . In our situation we will be mostly exporting Truetype fonts (which have the GSUB and GPOS tables). However, Fontforge can export in a variety of other formats - take a look at the official documentation for a description of all the supported formats.

Figure 2.4. Export dialog

Export dialog

The export dialog in Fontforge

Note

It may be worthwhile to mention here that Fontforge also ships with a tool called sfddiff which compares two SFD files.

Copying, Pasting and Cutting Glyphs.

There are two ways in which you can copy (or cut) glyphs in Fontforge. In the default method, only the glyph from the currently displayed font (ie, the outline font in our case) would be copied (or cut). In the second method, the metadata (name, substitution information, etc) of the character in question will also be copied with the character. (There is also another way where the bitmaps associated with a particular character is also copied - but that's outside the scope of this particular document). To enable metadata copying, you must enable the Edit->Copy From->Glyph Metadata check box, and then do the copying/cutting.

As far as pasting is concerned, remember that when you paste from Font View, the contents of the clipboard will be pasted onto the selected glyph, clearing out whatever was there earlier. To avoid this, use the Edit->Paste Into menu item, or paste from the Outline View.

Rotating, Shifting and Scaling Glyphs

To manipulate the glyphs of a font, you will first need to understand how to select portions of the glyph (or for that matter, the entire glyph). When you open the Outline View in Fontforge, you will that the outline of the glyph has a number of lots dots which are used to control the extend and slope of the lines. The dots or points which control the slope are called control points (represented by small crosses), and the other main types of points include corner points (represented by square boxes), tangent points (represented by triangles) and curved points (represented by circles). Before starting work on this document, I was planning to explain the function of each and every type of point - but luckily (for me, that is), the Fontforge documentation does an even better job of that. Do take a look - I don't think I could have done better with the explanation. To select a portion of the glyph, drag your mouse over the points in that portion, and the points will get highlighted. To select the entire glyph, you can simply press Ctrl-A in the Outline view.

To shift the selected portion, you can click on a highlighted point, and then, while holding the Ctrl key, you can drag the entire selection with the mouse. Or alternatively, you can also move the selection by using the arrow keys.

When in the outline view, you will notice that a there is a secondary window by the side which looks like this:

Figure 2.5. Tool palette

Tool palette

The tool palette in Fontforge

This is called the "tool palette", and it contains the tools that you will be using to edit the glyph. While converting the fonts, you will be mostly using the rotate and scale/resize tools - which are represented by and respectively.

To rotate a selection, highlight the selection, click on the tool button, and while pressing the left mouse button, move the pointer up (or down) until you have the required rotation.

To scale the selection, highlight the selection, click on the tool button, and while pressing the left mouse button, move the pointer vertically to do vertical scaling, and horizontally to get horizontal scrolling.