TrueType hinting tutorial - Functions and delta hints

The high level description and the TrueType hints of the uppercase 'O' described in part 3 did not include additional instructions such as delta hints or additional function calls for specific sizes. To fine tune the font for specific low resolution sizes we can use special functions or delta hints. I will not discuss functions in detail since they are pieces of TrueType code written by a software or type engineer for their specific needs. There are very few functions used consistently by all font companies.

Delta hints

Delta hints are special hints that make exceptions at specific ppem sizes. They allow a point to be moved in fractions of pixels so the bitmaps can be altered. This is useful for removing and adding pixels or shifting all or part of a bitmap.

There are two types of delta hints: ones that move outline points (DeltaP); and ones that alter 'cvt' values (DeltaC). Both deltas take three arguments: outline point or cvt #, the ppem size and the amount of movement.


Let's return to our example uppercase 'O'.

tutorial picture 2

If we want to move pt0 one pixel to the right at 14ppem we could use a DeltaP hint to move the point. Smart placement of delta hints allows whole sections or whole glyphs to be shifted the amount of the delta hint. Since instructions are processed from the top down, a DeltaP that is moving a reference point will effect any relative points that use this reference point. In the next example I want to condense the uc O glyph one pixel to the right. By placing a DeltaP after the instruction for pt0, the point is moved the amount specified. Since pt12 uses pt0 as a reference point it will also be shifted. If the DeltaP was placed after the instruction for pt12, only pt0 would be affected.

MIAP[R], 3,3 
MIAP[R], 9,9 
SRP0[], 3   
MIRP[m>RWh], 20, 73 
SRP0[], 9    
MIRP[m>RBl], 15, 73
SRP0[], 23 
MDRP[MRBl], 12, 69
SRP0[], 24  
MDRP[M>RWh], 6 
MIRP[m>RBl], 18, 69 


One of the important situations to control when fine-tuning a font is the point at which its stem widths increase from one pixel to two or two to three. When working with a medium or regular weight font and a bold font, the bold font needs to be a minimum of two pixels. Often its natural weight is less than two pixels and would round down to one pixel. With a DeltaC in the 'prep' we can alter the size at which this cvt increases and all glyphs using this cvt will be affected with one command. This gives the type engineer control of the weight of the family.