Hinting and Font Maker

Hinting is a method of rendering fonts to look their best under many situations. When a font is presented at a very small size it is possible that arithmetic rounding errors can cause some parts of a character to appear differently to other parts that should look the same. Take the lower case letter 'h', the two stems could be rendered at different widths, as shown below:

Hinting example

In this case the left stem is two dots wide and the right stem is just one although the outline is the same. This is most obvious at small sizes and in particular small point sizes on the VDU screen. For instance an 8 point character 'h' on a SVGA screen (120 dots per inch) would be just 8 dots high, similar to the illustration above.

Hinting consists of programming instructions that allow certain distortions of the character to MAKE the two stems the same.

Font Maker cannot read the hinting instructions when it imports a font into its internal format, this format does not include, nor refer to hinting. Certain design rules may help. If all vertical lines are exactly the same distance from the left margin of the character then they will be rendered the same. This does not help the right hand stem of our 'h' because its grid distance from the left stem will vary with point size, changing the position on the grid.

The FULL version of Font Maker and above does allow certain editing operations directly on the TTF font in order to preserve existing hinting. In addition DERVAL MiniHinting may be added to a character using the Edit TTF Character module as descibed below.

In the Edit TTF Character module select the font and then the character and the screen will show the character ready for Editing. The first, and essential step, is to ensure that the vertical and horizontal stems are the same as other similar stems in the font. A standard must be decided upon and set before MiniHinting starts. Remember that ANY arithmetic operation on the parameters of a font may, and probably will, cause rounding errors of some sort.

For this example the lower case 'h' will be considered. Select the bottom/left position of the left stem using the the Logic NOT key (see the Help file for Accelerator Keys) and then move the mouse cursor to the bottom/right of the same stem and press the 'H' key for Horizontal. If the system has noticed any existing hinting then a warning will be given. A small click will confirm the hint has been marked and inserted. Repeat for the other stem. The stems may be selected in the other direction by first pointing to the right side and the marking the left with the 'H' key. Vertical hints may be inserted with the 'V' key.

Care should be taken when selecting and marking a hint if direction could be important. For example on an upper case 'E' the bottom leg should be marked upwards to try to preserve the baseline and the top should be marked downwards to preserve the Caps Height. Similarly a lower case 'm' may look one sided, and it has been found that it is better to hint the left stem towards the right and the other stems towards the left.

The hinting data is not saved (generated instructions are) and cannot be read so if changes are to be made the character must be rehinted. A carefully kept log of changes will help. This MiniHinting system is kept simple to do a simple job and does not pretend to to be sophisticated, later versions may include more facilities.