Automatic spacing/kerning: an attention-based approach (collaborators wanted!)
Sebastian Kosch
Posts: 2
Hello typophiles,
I've been hacking on a new approach to letterfitting and thought perhaps some of you might be interested (seeing as Simon got some good discussion out of his Atokern thread). It's inspired by a deep learning concept (attention masking) but doesn't actually use a neural net, because I don't think neural nets are the right solution – we need an understandable model with fully adjustable parameters, not an inscrutable black box.
I've been hacking on a new approach to letterfitting and thought perhaps some of you might be interested (seeing as Simon got some good discussion out of his Atokern thread). It's inspired by a deep learning concept (attention masking) but doesn't actually use a neural net, because I don't think neural nets are the right solution – we need an understandable model with fully adjustable parameters, not an inscrutable black box.
I have some preliminary results, and what's needed now is a solid tool to evaluate how different implementations for the various parts of the model would affect the quality of the output depending on font type (e.g. display-size hairline italic sans vs. caption-size blackletter). Since I don't think I'll find enough time to finish this by myself in the near future and didn't want this to languish on my hard drive forever, I wrote up what I have so far as a blog post. I'm happy to answer any questions here if my explanations are unclear.
Perhaps one of you is intrigued enough and willing to help me tinker with this as a team?
Tagged:
6
Comments
-
This is fascinating! And I think you are on to something here. After I realised I wasn't getting anywhere with the neural network approach, I thought about a few other different possibilities, before ending up with the "equal area" approach borrowed from HT_LetterSpacer. But one of those possibilities was, in essence, a much cruder version of what you describe here:
- Arrange a set of key letters like "nnnn"
- Gradually apply a Gaussian blur until there's no whitespace between the stems.
- Use the same blur radius on your target pair.
- Adjust the spacing of the target pair until the midline has an even grey.
I'll take some time to digest this and then have a play with your code. Exciting!2 -
Thanks Simon! Looks like we're thinking along the same lines here. The crux is in the "until the midline has an even gray" – can you express that more rigorously?Oh, and be forewarned, the code looks like this:0
-
I'm very much intrigued. As for whether or not I have anything useful to add to the project myself? Probably not. Nice to see a new post on your site, though.
0
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