Rounding Coordinates»

Contour > Preview Rounding (H) is a setting that turns on visual rounding for points coordinates, metrics etc. in the Glyph window editing area. But it doesn’t turn off actual fractional precision for outline editing and transformations.

To forcibly round coordinates to single units in the current glyph, use the Contour > Apply Rounding command. This is a one-time immediate effect.

Most font editors keep the positions of nodes and handles always at integer positions in the font design space, such as “104, 52” rather than “104.3, 51.9”. Turning off “Preview Rounding” allows FontLab to show decimals in the positions.

The advantage of allowing FontLab to use fractional precision rather than rounded coordinates is that you can scale and transform freely, and operations can be reversed without loss of accuracy. For example, if you have a rectangle that is 35 units thick, and scale it 50%, then scale it 200%, you will end up back at 35 units. If you are using rounded coordinates, you will end up either at 34 or 36 units, depending on how the thickness was rounded when you first scaled it down by 50%.

Why don’t people always work with such precision? The final output fonts must use integer coordinates if they use TrueType outlines, and using higher-precision coordinates with PostScript outlines is non-standard and results in larger font file sizes. So FontLab still has to round the coordinates in the final output font. Users who want their editing to better reflect final output may wish to keep “round coordinates” on, while users who want more accurate free-form editing may wish to turn it off.

Turning “preview rounding” on doesn’t mean FontLab will scale with rounding errors. It still will use fractional coordinates for all operations but will round the result coordinates to keep points on an integer grid. For example, if you have a rectangle that is 35 units thick, and scale it 50% you will see it is now 18 units thick:

Turning Contour > Preview Rounding off at this moment will show you the actual size of the rectangle:

Scaling at 200% will end up back at 35 units regardless of the Preview Rounding setting:

Both 17.5 and 18 units will be scaled to 35.

This may cause some visual effects which certainly might look strange at a first glance (like 18*2=35 in the sample above). But when you turn Preview Rounding off and look at the actual floating values, everything will fall into place.

To actually apply rounding to all coordinates in the current glyph, use the Contour > Apply Rounding command. This will change the fractional size (17.5) of our sample square to 18 units; so scaling at 200% will now end up at 36 units.