Quantcast
Channel: TypeDrawers
Viewing all articles
Browse latest Browse all 4188

A new approach to spacing?

$
0
0
I've often found it strange that there's a big impedance mismatch between the thing that we want to do when spacing - to set the distance between a pair of glyphs - and the three knobs that we have to twiddle to set that distance - RSB of the left glyph, LSB of the right glyph, and a kerning pair. It's as if you want to set the temperature of a shower, and you have a cold tap, a hot tap, and a mixer tap. (Oh, and the hot and cold taps affect other showers too.)

Yes, I know about spacing key letters, but I still find myself scratching my head about which taps to open and close when /r/s is too loose but /t/s is too tight and /t/n and /r/o look kinda OK and...; and besides, sidebearings and kern pairs are implementation details. Actually I shouldn't have to care about these things - I just want to set the distances!

So, I realised that we can just tell the computer the distances we want, if we express those distances like so:
dist[o,o] := 76   ->  76 = RSB[o] + LSB[o] + kern[o,o]
dist[o,n] := 108 -> 108 = RSB[o] + LSB[n] + kern[o,n]
dist[n,o] := 97 -> 97 = RSB[n] + LSB[o] + kern[n,o]
center o -> LSB[o] = RSB[o]
...

This is a set of simultaneous equations, and computers are good at solving equations. We can even get the computer to find the best solution, by finding the case where the total of the squares of the kern pairs is at a minimum, meaning that kerns are only there if they need to be.

I did a few tests in Mathematica, and it gave me pretty similar numbers to the ones I had come up with using the normal approach. So I wrote a UI which lets you drag or nudge glyphs around, and it solves the equations for you:



Is this a crazy idea? A useful idea? A useful crazy idea? Or something else?

Viewing all articles
Browse latest Browse all 4188

Trending Articles