Autospacing: the CounterSpace library
Simon Cozens
Posts: 752
Those who know me will know I have become somewhat obsessed with the problem of automated letterfitting: not just spacing (determining sidebearings) but also full fitting (adjustments for uneven pairs, i.e. kerning). My latest attempt at this can be found here. It consists of a Python library, a Jupyter notebook, and a Glyphs script.
This document explains the concept and shows some sample outputs. Here are some more examples of automatically fitted strings (red) compared with the designer's spacing (blue).
For the sake of full disclosure, here are some heroic failures.
Here's a summary of what I've learnt through the process:
This document explains the concept and shows some sample outputs. Here are some more examples of automatically fitted strings (red) compared with the designer's spacing (blue).
For the sake of full disclosure, here are some heroic failures.
Here's a summary of what I've learnt through the process:
- Using an "'influence" approach to spacing seems to work pretty well in general.
- Having the designer declare key pairs as correctly spaced and inferring the parameters from there seems to be the best kind of user interface to this job.
- The hardest part of automated letterfitting is managing and correcting half-open counters.
3
Comments
-
Having the designer declare key pairs as correctly spaced and inferring the parameters from there seems to be the best kind of user interface to this job.Amen.
0 -
I don’t know about other designers, but my taste in kerning and spacing isn’t carved in stone. I’m presently working on an expanded variable version of a typeface I designed 20 years ago in quite different circumstances (and with different software and hardware), and have decided it needs respacing. I’d like to think I’m improving on the original, but on the other hand, my taste has changed, and maybe I should have stuck with the “authentic”, in-the-moment design. Then again, on any given day that one is doing a design, it will come out differently. Twenty years ago, I listened to music all the time I was making fonts, now I work in silence. Go figure. So many butterflies in effect!5
-
Font spacing and kerning is very subjective. No two people will ever see it exactly the same. That being said, there are many general guidelines to follow for standard text, display and for point sizes based on screen or for print. Many well designed fonts currently exist and can be utilized for this purpose. The more experience you have the better your results will be. That's true for most things.
I agree completely with Nick and often find myself trying to improve on many of my older font releases. It's human nature to strive for that elusive perfection. But, we cannot help ourselves. It's the way most creative people are. And we should be commended for that.
Now, I'm off to finish the spacing and kerning on my upcoming new font family release. It's my second pass on my original established spacing and kerning and I'm still tweaking. Maybe third time will be the charm.
And, I'm sure that when I look back years from now, I'll want to make additional changes.
Back to work!2 -
@Simon Cozens The one thing that surprises me is the significant sidebearing addition to the left side of the upright (not italic) /A in the auto-spacing, when it starts the line.
It seems to me that perhaps your algorithm is treating the beginning of the line as equivalent to being next to a solid square with zero sidebearing and adjusting the position accordingly? But whatever the cause, the result is not ideal, IMO.0 -
@Nick Shinn and @Alex Kaczun: I agree with what you’re saying but want to push back on a subtle distinction. The overall approach to spacing a font, the way it’s going to look, is a subjective judgement. But once that judgement has been made, the spacing of most individual pairs from then on is a matter of fitting in with that style, in the same way that once you have designed a testword well then you have pointers that should carry you through the rest of the design. If I’m right about that, then automated spacing is a possibility if there is a mechanism for the designer to declare a set of prototypical pairs.
@Thomas Phinney: What you’re seeing is just the word being centred. I’ll fiddle it to be left-aligned in the comparison; that might be clearer.0 -
Left-aligning the output shows that it wants to cut a bit deeper into overhangs like "TA" and "AV" than the designer did.
Also, the Tinos Italic version actually seems to work a lot better with the serif smoothing turned off:
1 -
Instead of left-aligning the output, you could (if you wish) instead adjust the bottom ruler position so that its zero is at the origin for the first glyph. (I assumed it was.)0
-
This is awesome, Simon! I've had some fun with a similar project and am getting really pretty good results. Having the different colored words overlayed on each other makes it difficult for me to really understand the visual effect of the two different spacings since the white white space has color intrusion. I wonder if it would help to have them vertically stacked instead so you can see each one as a whole word in order to judge the given spacing of one and easily compare it to the other without visual interference? Just a thought.1
-
Abraham: See the bottom of https://github.com/simoncozens/CounterSpace/blob/master/Spacing_with_countershapes.ipynb now:
1 -
Simon said:if there is a mechanism for the designer to declare a set of prototypical pairs.I don’t believe that to be so.
When kerning through the alphabet in the Metrics window, I often go back and readjust earlier sidebearings, or glyph details (e.g. the relative width of the horizontals in E, F, L and T), as the overall picture falls into place. Feedback loops, not linear progression.2 -
@Simon Cozens
If interested, contact me directly at akaczun@verizon.net
I have a few ideas that might help you with your project.
I've been thinking about this sort of thing for some time.
Maybe I can be of some help in a slightly different direction.
Best—Alex K.0 -
Simon Cozens said:Abraham: See the bottom of https://github.com/simoncozens/CounterSpace/blob/master/Spacing_with_countershapes.ipynb now0
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 803 Font Technology
- 1K Technique and Theory
- 622 Type Business
- 444 Type Design Critiques
- 542 Type Design Software
- 30 Punchcutting
- 136 Lettering and Calligraphy
- 83 Technique and Theory
- 53 Lettering Critiques
- 485 Typography
- 303 History of Typography
- 114 Education
- 68 Resources
- 499 Announcements
- 80 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 270 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports