Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

 

Mäkíng Åçcêñtèd Glÿphs

Introduction

Traditionally, TrueType fonts have always had a limited set of accented glyphs. Now that fonts are no longer limited to 256 glyphs, it is possible to have a font that contains a much richer repertoire of accented glyphs, which allows it to be usable in many more languages than before. The process of creating these accented glyphs can be broken down into the following steps:

    1. Determine your glyph repertoire. Apple has a recommended set of accented glyphs, which cover a wide range of languages. Depending upon how widely you intend to have your font used, you may need to add more or less accented glyphs. For example, Apple's basic glyph repertoire covers all European roman languages (French, Spanish, etc.; see the full list). An extended set of accents would allow the same font to be used for Vietnamese as well, for example. You may also want to check other references, such as the Unicode Standard, for additional glyphs and proper accent positioning.
    2. Create the base glyphs. The term "base glyphs" can be defined as those glyphs that make up the components for an accented glyph. For example, the " a " in " å ".
    3. Create the accents. The accents are those components which are added to the base glyph to create the new glyph. For example, the " ¨ " in " ö ".
    4. Determine which method you will be using to position the accents relative to the base glyphs. There are two methods available; offset and anchor. Both have pros and cons.
      • Anchor Method: Using the anchor method is the most accurate way of positioning accents. By providing an extra point on both the base and accent glyphs, and having these points line up, the designer can carefully control where the accent goes, since these "anchor points" are instructable just like the rest of the glyph's contour points. However, to use the anchor method the designer must plan ahead, and add these points during the initial contour design phase of development. This is the recommended method if you are starting a font from the beginning.
      • Offset Method: Using the offset method is easier to do than the anchor method, but positioning is inherently less accurate. The designer provides a set of x and y offset (position shift) values for the accent. However, since there is no control over gridfitting, the accent may "drift" at various sizes, and the designer must try to find a position that works as best it can at all sizes. The offset method does not require anchor points, however, with makes it the method of choice when adding additional accented glyphs to an existing font that has already been designed and instructed. This is the recommended method if you are adding to an existing font.
    5. Create the new glyphs that are combinations of the base and anchor glyphs, using the method chosen above. This is described in detail below, or can be done using the using the AAT Font Tool and Slider tools.
    6. Proof the accent's positioning at various sizes and resolutions, using waterfalls. This can be incorporated in the editing you would probably be doing anyhow, to check the font's instructions.

One example of each method will be illustrated below. Although these examples will show the accent to be above the base glyph, there are many cases where the accent will be below (ç), beside (some Romanian and Vietnamese glyphs) or inside (Hebrew) the base glyph. The principles for positioning remain the same for all accents and other uses.


Anchor Method

The illustrations are screen shots from RoyalT, Apple's TrueType editing tool. Shown here is a Hebrew glyph.

There are several anchor points for this base glyph, because different 'accents' are attached to several different points on this glyph. (Although in Hebrew these are linguistically not "accents", but Cantelation marks, the principle for positioning remains the same.) They are points 12, 41, 42 and 43. In addition, point 30 is used as both a contour and an anchor point. This is acceptable, but the designer must be aware that if this is done flexibility of positioning is lost, because the point cannot be moved to position the accent without distorting the contour.

This accent uses point 1 as the anchor point. This glyph is simple enough that no additional anchor point was thought to be required.

When combined, the points are renumbered. Points 41 and 45 (formerly point 1 on the accent) are positioned at the same coordinates, which positions the accent accordingly.

Notice that when the glyph is gridfit (instructions turned on), and the pixels displayed, the accent positions itself correctly, because the attachment point in the base glyph was instructed along with the rest of the contour.

The TrueType instructions for glyph 118, the compound glyph, are as follows:

OFFSET[1] 152 0 0

ANCHOR[] 4 41 1

These instructions break down as follows:

OFFSET (get glyph) [1] (boolean: gridfit) 152 (the base glyph), with an offset (shift) of 0 in x and 0 in y.

ANCHOR (attach to an anchor point) glyph 4 to point 41 of the original glyph, point 1 on the anchoring glyph.

Or, to put it another way:

OFFSET[boolean: gridfit] GlyphNumber Xoffset Yoffset

ANCHOR[] GlyphNumber BaseGlyphAttachmentPoint AnchoredGlyphAttachmentPoint

For a full description, see the "Component characters" section of the RoyalT Manual. Note that these are not true instructions; they are constructs used by RoyalT, which is the tool that was used to generate these examples. The actual TrueType code that these constructs control is described in the 'glyf' table section of the TrueType Reference Manual, . This information is most useful to programmers, however, and the RoyalT examples given here illustrate what is being done without going into excessive detail.

Return to Top


Offset Method

The glyph in this example does not have any attachment points. Instead of an Offset and and Anchor instruction, we will be using two Offsets. One again, we have the base glyph

 

and an accent glyph.

These are combined with the following instructions for glyph 105:

OFFSET[0] 68 0 0

OFFSET[1] 141 0 0

These instructions break down as follows:

OFFSET (get glyph) [1] (boolean: gridfit) 68 (the base glyph), with an offset (shift) of 0 in x and 0 in y.

OFFSET (get glyph) [1] (boolean: gridfit) 141 (the accent glyph) with an offset (shift), of 0 in x and 0 in y.

Or, to put it another way:

OFFSET[boolean: gridfit] GlyphNumber Xoffset Yoffset

OFFSET[boolean: gridfit] GlyphNumber Xoffset Yoffset

For a full description, see Component characters in the RoyalT Manual.

 

When gridfitting is on, the positioning looks good.

In this example, the accent did not have any offset in x or y. This is partially because this font uses different glyphs for uppercase and lowercase accents. If the uppercase and lowercase glyphs were sharing accents, the designer would have to position the accent for one, and shift the glyph vertically for the other, by having a non-zero value for the Yoffset. Similarly, if the designer tries to use the same accent over two glyphs with widely different widths (such as an "i" and a "w"), it may be necessary to shift the accent horizontally to center the accent over the base glyph properly. To do this, a non-zero value would be used for the Xoffset. Either or both of these can be done at the same time.

It is especially important to check the results of the offset method at all point sizes, because the accent will have a tendency to shift as it gridfits, and what looks good at one size may not look good at others. The designer will have to compromise, to try to find the best overall position that satisfies all sizes that are likely to be used.

Return to Top


Other Uses

It is also possible, when using either the anchor or offset method, to position multiple accents over a single base glyph. This can be done by using an Offset and multiple Anchor instructions, or three or more Offset instructions. This is necessary for Vietnamese, for example. Here is an example of a Hebrew glyph with two accents being anchored at the same time.

In this example, the instructions are:

OFFSET[1] 152 0 0

ANCHOR[] 4 43 2

ANCHOR[] 4 42 2

The same accent is being positioned in two different places, by being attached to two different anchor points. Note that in this example, the accent's attachment point is it's lower left point, not lower right as in the earlier example. This shifts the position of the accent right.

These instructions cannot tell which glyph is an "accent" and which is not. Therefore, it is possible to use these methods for creating other multiple-part glyphs, such as ligatures (f and f to make ff, f and f and l to make ffl, etc.) or other special glyphs (= and / to make , or two ~ to make ), but the designer must be careful not to use these combinations where it makes better sense aesthetically to design a true glyph shape from scratch.

Return to Top


Using the AAT Font Tool and Slider tools

The above methods work, but are tedious and time consuming. They are included here mostly to illustrate the principles of combining glyphs to make components. Apple has several other tools that make adding and editing accented glyph much easier. These tools use the Offset method.

The AAT Font Tool automatically adds compound glyphs to a font, using an Add List, in which the designer specifies in list form which glyphs they wish to have combined and added to the font, along with accent positioning information. Once an Add List has been written, it can be used for any number of fonts, or edited where later changes are needed. This approach can greatly save time for the font designer. Detailed information on how to use this tool is provided in the AAT Font Tool manual.

While the AAT Font Tool can do a very good job of positioning the accents all by itself, fine-tuning the positions of the accents is most easily done using an application called Slider, which allows the designer to visually position the accent(s) around the base glyphs quickly and easily, automatically revising the low-level TrueType Offset instructions, so the designer can concentrate on visual appearance and not on coding. Slider automatically keeps track of point renumbering, marking the glyph as having overlapping contours if necessary, etc. Detailed information on how to use this tool is provided in the Slider manual.

Return to Top


Version 1.0
Arleigh Movitz

Copyright©1997 by Apple Computer, Inc.
Updated 9/2/97 by applefonts@apple.com