| Microsoft Typography | Developer information | Hinting tutorial | Basic global tables | |||
|
Basic global tables Basic TrueType hinting involves three tables3 that are global to the entire font: the Control Value Table, the Preprogram Table and the Font Program Table. Control Value Table ('cvt') TrueType allows control over the regularity of features4 through the use of values stored in the 'cvt' table. Control values are measurements of features, such as lowercase stems widths. These stems, although similar to one another, may have slightly different outline distances. With cvts the distances can be controlled so they are the same pixel width at a low resolution. At a higher resolution the control value won't be used but the natural distance will display in the stems. The Control Value table doesn't require these values to be glyph5 feature distances. The values are an integer and can be accessed from many TrueType instructions. The table also can be written to as well as read from other tables. Other examples of glyph and font features that can be stored in the control value table are: cap heights, x-heights, overshoot6 distances, ascender heights, baselines, figure heights, serif lengths and heights, italic angle, group (uppercase, lowercase, etc.) stem distances, group round distances. Other features might be: smaller group distances such as a math sign stem distance, braces, brackets, or parentheses distances.
Figure 1. Features of a lowercase 'b'.
In every font there are certain conditions that will always apply. In TrueType we control these conditions through code placed in the preprogram. The 'prep' table is executed each time a glyph size or resolution is changed and before the glyph's local instruction are executed. This is a good place to control global conditions for all glyphs. Some examples of what to put in a 'prep' are...
This table stores functions9 that can be called from the 'prep' or from the glyph's instructions. Functions are used to eliminate repetitive code from being used in multiple glyphs. A common example is to control the placement of a diacritic10 over a base glyph. TrueType supports composite glyphs (glyphs made up of other glyphs). In composite glyphs the bitmaps of these already hinted glyphs may not be placed in the same way as the original unhinted outline position in the horizontal and vertical direction. A function is often used to insure the diacritic centers over a base glyph and the diacritic does not touch the top of the base glyph.
3. TrueType font files are separated into sections of similar data called tables. 4. These can be heights of the letter groups, stems or rounds of a group, and serifs. 5. An image in a font file. For comparison a lowercase 'a' is a character. In the latest font file technologies (TrueType Open and TrueType GX) there can be several glyphs that are a lowercase 'a' in a font file. 6. The difference between the round and flat glyph heights and baselines in a group. Round characters need to project higher and lower to give the appearance of equal height. 7. An acronym for pixel per em. Pixels per em are a non resolution dependent unit of measure. PPEM are calculated by the equation: PPEM = pt size * resolution/72 8. An image made of pixels. In this document a bitmap refers to the displayed characters after the glyph's hints are processed. This is not to be confused with a 'bitmap font file' . 9. A general term for a particular kind of subroutine. 10. A mark normally used in conjunction with another glyph. In Latin fonts these are sometimes called 'accents'. In Hebrew and Arabic these are marks that denote vowels.
|
|||
| Microsoft Typography | Developer information | Hinting tutorial | Basic global tables | |||