3. PostScript outlines and PS hinting
3.1. PS hinting UI elements
Preferences dialog box controls some vital aspects of how PostScript-flavored fonts (Type 1 and OpenType PS) are generated. In
Preferences / Generating Type 1, the option
Autohint unhinted glyphs allows you to automatically autohint the font when it is generated even if you did not perform any specific autohinting tasks. If a glyph does not contain any PS hints and this option is enabled, FLS will automatically generate hints for that glyph.
If you wish to control your hinting manually and there are good reasons why you did not hint some glyphs, disable this option. (This will also allow you to generate PostScript-flavored fonts without hinting if you remove the PS hints from all the glyphs).
Note that if the
Autohint unhinted glyphs option is enabled, the rasterized previews in the
Type 1 Hinting mode (and in its Preview panel) for glyphs with no PS hints present will be generated after the glyphs have been autohinted in the background, so you will see no hints but a PS-hinted preview. So if you want to reliably preview the rasterization of your actual PS hints, you should disable this option.
[singlepic w=645 id=2]
Generating Type 1 / Type 1 autohinting page, disable the option
Remove all existing hints before autohinting if you wish FLS to add automatically generated hints to existing PS hints.
[singlepic w=645 id=3]
The most commonly used design source for fonts are fonts (or .vfb documents) with PostScript outlines. An example of such font is Myriad Roman:
[singlepic w=645 id=4]
When a PostScript-flavored font is open, small green “
H” marks in the lower-left corner of the Font Window’s glyph cell will indicate glyphs in which PS replacement hints are present. Glyphs that have PS hints but have no replacements hints are not indicated in any particular way.
Double-clicking on a glyph cell will open the Glyph Window. To view the PS hints present in the glyph, enable
View / Show Layers / Hints. To view the PS alignment zones (blue zones), enable
View / Show Layers / Alignment Zones.
[singlepic w=645 id=5]
For a more detailed view of the PS hinting for a glyph, choose
Tools / Hints & Guides / Type 1 Hinting.
[singlepic w=645 id=6]
Type 1 Hinting tool allows you to rasterized a preview of how the glyph will be rendered in a variety of rasterizers. Click on the
Preview panel button in the
Type 1 Hinting toolbar to open the
Type 1 Hinting Preview panel. A click on the little rectangle in the top-right corner of the panel allows you to select the rasterizer.
[singlepic w=645 id=7]
Note that FontLab Studio 5.0.4 on Mac OS X has a bug in how it integrates with the built-in Adobe rasterizers, so FLS may crash or display the wrong rasterized images when any of the Adobe rasterizers is selected. This bug does not affect the quality of hinting written into the font. The Windows version of FLS is more stable.
Also keep in mind that if the option
Autohint unhinted glyphs is enabled in
Preferences, then the
Type 1 Preview rasterization will be autohinted even if the glyph window does not show any PS hints.
While the hints are controlled on the glyph level, there is a number of relevant font-wide hinting settings. To view and edit them, open
File / Font Info and open the
Hinting Settings subsection.
The first page,
Type 1 and TrueType hinting: alignment zones, controls the primary PS alignments zones (that are typically located above the baseline) as well as the secondary PS alignments zones (typically located below the baseline).
The PS alignment zones will be used in PS hinting, and they will also be converted into TT alignment zones.
By clicking on
Auto zones, FLS will automatically rebuild the PS alignment zones for the font. It will do so by analyzing the bounding boxes of a hardcoded list of uppercase and lowercase English letters. If your font contains multiple alphabets (scripts), or if it contains numerals or small caps that are of obviously different height than uppercase or lowercase letters, you should add more PS alignment zones that will control the overshoot suppression.
[singlepic w=645 id=8]
The second page,
Type 1 hinting: standard stems, controls the vertical PS standard stems that correspond to x-direction hinting, as well as the horizontal PS standard stems that correspond to y-direction hinting.
The PS standard stems will be used in PS hinting, and they will also be converted into TT standard stems which are stored in the
Auto stems will automatically build a list of PS standard stems found in the font. This will be done by analyzing the PS hint values found in the font — which means that the font needs to have hinting for
Auto stems to work.
Also note that quite often, FLS will generate more PS standard stems than really necessary. For example, in Myriad Roman, the original V stem values are
88 92, and the original H stem values are
67 73. After
Auto stems, V stem values will be
88 70 97 and H stem values will be
73 55 68. In some cases, stem values will be quite close to each other, and you may want to unify them.
Note: When converting PS hinting into TT hinting, you can control the
Single link attachment precision with which FLS will match each stem width with the TT standard stems. If you create fewer standard stems and increase the precision, the stems in the TT font will appear more uniform. If you create more standard stems and decrease the precision, the stems in the TT font will appear more varied.
[singlepic w=645 id=9]
Type 1 hinting: global hinting parameters page only affects PS hinting. It does not affect TT hinting. Please refer to the FLS manual and the Type 1 font format specification for more information about those parameters.
[singlepic w=645 id=10]
Type 1 autohinting page defines the minimal and maximal distances (in font units) between outline for which PS hints will be automatically generated if glyphs are autohinted. For very thin fonts, lowering the
Min width values may be a good idea. For very bold fonts, raising the
Max width values may be useful.
[singlepic w=645 id=11]
3.2. PS autohinting
If your font already has PS hints, PS standard stems and alignment zones defined, you can skip this step.
If your font does not have PS hints, you should perform the following steps to obtain PS hinting automatically:
- Go to
Font Info / Hinting Settingsand click on
- Add and revise the alignment zones as needed.
- For each font that has stems that are thinner than
20units or thicker than
250units (default values), navigate to
Font Info / Hinting Settings / T1 Autohintingand set the
Max widthvalues to match the thickness of your thinnest/thickest stems. Click on
Tools / Action Set.
- From the
Hints and Guidelinessection, add the action
Autohintto your action set.
- If you’d like to only generate y-direction hints (i.e. horizontal hints) because you plan to generate a TrueType-flavored font that does not need to be hinted in the x-direction (for example because the font will only work in ClearType, or the font is italic and the vertical hints to not make much sense), add the action
Remove hints/guidesto your action set, and in the action’s options check
Remove vertical hintsand uncheck all the other options.
- From the
Hints and Guidelinessection, add the action
Autoreplaceto your action set.
Apply action to:
All glyphs in the fontor
All opened fonts. Click on
- Go to
File / Font Info / Hinting Settings / Standard stems (T1 hinting)and click on
- Add, revise and merge the PS standard stems as needed.
- Click on
- If you wish to use the Adobe PS autohinter, from the
Macrostoolbar choose the
Outlinessubgroup and pick the
Auto-hintmacro. Ctrl-click on the
Runbutton to view the macro UI, set the desired parameters and run the autohinting process.
[singlepic w=645 id=12]
After completing this process, you have a hinted PostScript-flavored font.
Note: the Adobe PS autohinter relies on the presence of standard stems in the font. The FontLab auto-stems algorithm relies on the presence of PS hints in the font. The FontLab PS autohinter analyzes the outlines only. Therefore, the the recommended chain of actions to use Adobe PS autohinting is: auto-zones, FontLab autohint, auto-stems, Adobe autohint.