Rounding Coordinates»

FontLab supports fractional coordinates for all nodes, metrics, etc. The advantage of 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 fractional 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 on export at least for TrueType-based font formats. 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.

To work with fractional precision, turn Contour > Coordinates > Round when Editing off. When turned on this option makes all further editions to use just rounded values, but will not affect the already existing, unedited values.

While working in fractional space you can still see integers only. Contour > Coordinates > 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 turn off actual fractional precision, turn the Round when Editing command on.

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 instantly round coordinates of all items (nodes, guidelines, hints, zones, anchors etc.) in the current glyph, use the Contour > Coordinates > Apply Rounding command. This one has a one-time immediate effect. For example, 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.