# Tutorial #4

- Font Creation
- Creating a character (tracing outlines)
- Navigating to other characters
- On to the next character (consistent directions)
- Consistent serifs and stem widths
- Building accented characters
- Building a ligature
- Examining metrics
- Kerning
- Character variants
- Anchoring marks
- Checking your font
- Generating it
- Font Families
- Final Summary
- Notes on various scripts

## Building accented characters

Latin, Greek and Cyrillic all have a large complement of accented characters. PfaEdit provides several ways to build accented characters out of base characters.

The most obvious mechanism is simple copy and paste: Copy the letter "A" and Paste it to "Ã" then copy the tilde accent and Paste it Into "Ã" (note Paste Into is subtly different from Paste. Paste clears out the character before pasting, while Paste Into merges what was in the character with the what is in the clipboard). Then you open up "Ã" and position the accent so that it appears properly centered over the A.

This mechanism is not particularly efficient, if you change the shape of the letter "A" you will need to regenerate all the accented characters built from it. PfaEdit has the concept of a Reference to a character. So you can Copy a Reference to "A", and Paste it, the Copy a Reference to tilde and Paste it Into, and then again adjust the position of the accent over the A.

Then if you change the shape of the A the shape of the A in "Ã" will be updated automagically -- as will the width of "Ã".

But PfaEdit knows that "Ã" is built out of "A" and the tilde accent, and it can easily create your accented characters itself by placing the references in "Ã" and then positioning the accent over the "A". (Unicode provides a database which lists the components of every accented character (in Unicode)).

As an example, open the file: tutorial/Ambrosia.sfd, then select all the characters at encodings 0xc0-0xff, and then press Element->Build->Build Accented all the accented characters will magically appear (there are a few characters in this range which are not accented, and they will remain blank).

PfaEdit has a heuristic for positioning accents (most accents are centered over the highest point of the character), sometimes this will produce bad results (if the one of the two stems of "u" is slightly taller than the other the accent will be placed over it rather than being centered over the character), so you should be prepared to look at your accented characters after creating them. You may need to adjust one or two (or you may even want to redesign your base characters slightly).

## Creating a ligature

Unicode contains a number of ligature characters (in latin we have: Æ, OE, fi, etc. while in arabic there are hundreds). Again Unicode provides a database listing the components of each standard ligature.

PfaEdit cannot create a nice ligature for you, but what it can do is put all the components of the ligature into the character with Element->Build->Build Composite. This makes it slightly easier (at least in latin) to design a ligature.

Steps to building a ligature
Use the Element -> Char Info dialog to name the character and mark it as a ligature. Then use Element -> Build -> Build Composite to insert references to the ligature components. | Use the Edit-> Unlink References command to turn the references into a set of contours. | Adjust the components so that they will look better together. Here the stem of the first f has been lowered. | Use the Element -> Remove Overlap command to clean up the character. | Finally drag the ligature caret lines from the origin to more appropriate places between the components.

Some word processors will allow the editing caret to be placed inside a ligature (with a caret position between each component of the ligature). This means that the user of that word processor does not need to know s/he is dealing with a ligature and sees behavior very similar to what s/he would see if the components were present. But if the word processor is to be able to do this it must have some information from the font designer giving the locations of appropriate caret positions. As soon as PfaEdit notices that a character is a ligature it will insert in it enough caret location lines to fit between the ligature's components. PfaEdit places these on the origin, if you leave them on the origin PfaEdit will ignore them. But once you have built your ligature you might want to move the pointer tool over to the origin line, press the button and drag one of the caret lines to its correct location. (Only TrueType and OpenType support this).

There are a good many ligatures needed for the indic scripts, but Unicode does not provide an encoding for them. If you wish to build a ligature that is not part of Unicode you may do so. First add an unencoded character to your font (or if your font is a Unicode font, use a code point in the private use area), and name the character. The name is important, if you name it correctly PfaEdit will be able to figure out that it is a ligature and what its components are. If you want to build a ligature out of the characters "longs", "longs" and "l" then name it "longs_longs_l", if you want to build a ligature out of Unicode 0D15, 0D4D and 0D15 then name it "uni0D15_uni0D4D_uni0D15".

Once you have named your ligature, and inserted its components (with Build Composite), you probably want to open the character, Unlink your References and edit them to make a pleasing shape (as above).

Finally you should check that PfaEdit has marked your character as a ligature (and, if so, as the right kind of ligature). Bring up the Element->Char Info->Ligature dialog. You should see a line like:
`liga m longs longs l`
or
`liga m uni0D15 uni0D4D uni0D15`
In the first case you might want to add an additional line (by pressing the [New...] button:
`liga m longs_longs l`
(assuming you have a longs_longs ligature already). While in the second case you might want to select the line, press the [Edit...] button and change the ligature type from 'liga' to 'akhn' (I don't know enough about Indic scripts to understand this distinction myself), yielding:
`akhn m uni0D15 uni0D4D uni0D15`

-- Prev -- TOC -- Next --