Snap nodes to grid macro?

selfbuildtype's picture

Does anyone know of a method or macro that is capable of snapping nodes to a defined grid? I have some pixel fonts that have a few minute errors and this would make things a lot easier. Any suggestions? I searched for a macro but I was unable to find one that would do this.

Frode Bo Helland's picture

I think I read somewhere you can set the number of units in one em to match the number of pixels.

paul d hunt's picture

If your grid units are a factor of the original UPM (which is usually 1000) you can do the following:

Change the UPM to UPM/x where x=the distance between grid points. Et voilà, all minor errors are gone, as long as the adjusted UPM is an integer. Once you've done this, you can scale back up to the original UPM value without any rounding errors.

So if your grid units are 5 apart, shrink the UPM to 200, and then grow back to 1000 and all your points end up being on multiples of 5.

twardoch's picture

Of course, when changing the UPM in Font Info / Metrics and Dimensions, enable "Scale all glyphs according to UPM size change".

selfbuildtype's picture

Cheers guys, that's a smart work-around. I'll give it a go. Thanks!

Syndicate content Syndicate content