Type1 Fonts

Program structure   Example   The encripted section   Hints   type1 extentions   Home

An outline format Type 1 font is called a font program. it is an executable piece of software which, when executed by a PostScript interpreter, defines a set of character and symbol outlines that can be referenced by PostScript language documents.

There are currently over 1300 fonts in the Adobe Type Library and over 13,000 Type 1 fonts available from all font vendors. There are Type 1 font programs for virtually every modern language and alphabet.

Klingon fonts!   Type1 Hebrew fonts   Internet Font browser   Internet font archive

A Type 1 font program describes character shapes with mathematically expressed curves and straight lines. The resulting outline font is much more versatile than a bitmap format font. One outline description of a typeface can be scaled to any point size, rotated to any angle, or used for a variety of other transformations (see Figure 5). The advantage is not only the accuracy and ease of doing this, but also that only one copy of a font need be stored on a disk, instead of one font for each size and orientation.

Type 1 font programs contain information, called hints, that aid the PostScript interpreter in producing the best looking characters for all sizes and resolutions. The hinting method of the Type 1 format is relatively simple: Most hints are declarative statements stating where key features of a character are located. The intelligence for adjusting those features to look correct at any resolution, and to work at a variety raster devices, exists in the inter- preter. Consequently, the resulting fonts are of minimal size and are capable of improvement as interpreter algorithms improve.

Most typefaces in any type library are proportionally spaced type designs. Compared to monospaced faces, proportional space fonts are more legible, have a much broader variety of styles, and save a significant amount of space (see Figure 2). However, they require the application to do more work to access the metrics file and keep track of line widths.


The structure of a type1 font program:

Constructing a Type 1 font program means constructing a special type of font dictionary. As with any PostScript language data object, a PostScript language program constructs this dictionary.

A Type 1 font program includes the CharStrings and Private dictionaries,which are required in every Type 1 font program.

This is a conceptual overview of a Type 1 font program;

This figure shows the dictionary structure that the font program creates when it executes.The items contained in the figures are explained on ahead.

you can see a complete example here

All Type 1 fonts must begin with the comment: %! .This enables a file containing a PostScript program to be easily identified as such. It is important that every Type 1 font program and every PostScript language program start with a ``%!'' comment; otherwise, it may not be given the appropriate handling in some operating system environments.

The remainder of the first line (after the ``%!'') should identify the file as a conforming Type 1 font program. A Type 1 font program conforms to the specified version of the Type 1 font format if the first line consists of the following characters:

%!FontType1-SpecVersion: FontName FontVersion

where the number SpecVersion is the version of the Adobe Type 1 font format to which the font program conforms to, FontName is the name of the font understood by the PostScript interpreter, and FontVersion is the version number of the font program.

the example begins with: %!FontType1-1.0: Symbol 001.003

The comment: %%VMusage Is used to tell the application the amount of virtual memory the program will need.After the comments, the program allocates a dictionary with a capacity of 11 elements; this dictionary will become a font dictionary. The program inserts eight items (FontInfo, FontName, PaintType, FontType, FontMatrix, Encoding, FontBBox, and UniqueID) into the dictionary. The 1000 to 1 scaling in the Font- Matrix as shown is typical of a Type 1 font program and is highly recommended. Also highly recommended is that the values for the FontBBox be as accurate as possible. The PostScript interpreter uses this information in making decisions about font caching and clipping.

FontType must be set equal to 1 for all Type 1 font programs.

UniqueID is a value important to font identification and in help- ing the PostScript interpreter properly cache characters between jobs..

Next in the example program is the Encoding array. The Encoding array determines which character codes are associated with which character names in the font program. This character encoding can be changed without altering anything else in the font program.


Inside the Encrypted Portion

In the encrypted portion of the font program are the CharStrings and the Private dictionaries.
The CharStrings dictionary contains the encoded commands that draw the outlines of the characters included in the font. The Private dictionary contains hints and subroutines. The hints in the Private dictionary apply to the entire font. The Private dictionary may also contain various Post- Script language procedures that can modify the behavior of the font program in some versions of the PostScript interpreter.

The Private dictionary contains hints that apply across all the characters in the font, subroutines, and several other items such as a password.The hints used in character outlines help to preserve properties of shapes when rendered at limited resolutions. When the number of pixels in a character increases, as with very large characters or on high-resolution output devices, the hints become less impor- tant. When a stem is rendered at 100 pixels wide, a 1-pixel difference matters much less than when the stem is rendered at only 2 pixels wide. Thus, the implementation of hints mostly concerns rasterization properties at low resolutions and small sizes. With the hints in place, Type 1 can produce results that are as close as possible to the original design even though the shape is reproduced by a relatively small number of pixels.

Declarative Hints

As with any software, there are many possible ways to design a system to compensate for low resolutions and small character sizes on a raster output device. Some methods are more efficient than others for modifying character outlines at various sizes and rotations, for requiring minimal storage, and for allowing inde- pendence from any given level of rendering technology. Declarative hints state constraints on the size and positioning of character features, for example, the width of a stem or the location of an extremity. These declarative hints are stated in two distinct locations in a font program. The Private dictionary contains a number of font level hints that apply across all characters represented in the font program; the individual charstrings in the CharStrings dictionary contain character level hints that describe important typographic features about a particular character.

A declarative hint system depends on an intelligent rasterizing algorithm to render character outlines correctly. Adobe has built such an algorithm into the PostScript interpreter and its other rendering software, such as the Adobe Type Manager program. Consequently, the appearance of font characters created with declarative hints will continue to improve as hint handling algo- rithms improve, without modifying the Type 1 font programs.

Font Level Hints

Hints that apply across an entire font are declared by setting certain values in the Private dictionary. Many of these hints declare constraints on the vertical positions of character features across the entire font. This helps to maintain consistency across the font, especially when rendered at low resolution. For historical reasons, these hints are indicated by names that contain the word ``Blue.''

For example, Type 1 BuildChar uses the information in the BlueValues and OtherBlues arrays to adjust the rendering of character features that fall within alignment zones. This adjustment is called alignment control, which at small sizes includes overshoot suppression. At small sizes, when only a few pixels must represent a character, a one-pixel overshoot appears too prominent.

The CharStrings dictionary holds a collection of name-procedure pairs. The procedures to which the names refer produce the font's character outlines. Character procedures can also call subroutines (located in the Private dictionary) that produce similar parts of characters, thus reducing storage requirements. The charstring procedures also contain character level hints.

Character Level Hints

Within a character, font program developers can add declarative hints to indicate to Type 1 BuildChar that a horizontal or vertical stem occurs between certain coordinates. These same hints are used to indicate stem-like round features, such as the leftmost, rightmost, topmost, and bottom-most parts of the letter ``o''. It is important to communicate to Type 1 BuildChar exactly where such features occur so that it can apply special techniques to these parts of the outline.

Figure 6a. Character level stem hints (horizontal, vertical, and ghost stem hints)

type1 extentions   Home