Autokerner: free spacing and kerning for FontLab 8, all masters in one run

2»

Comments

  • SCarewe
    SCarewe Posts: 127
    You're missing the point. This is not about the font programme. It's about how "you" conceived your tool and are communicating about it.

    There is a huge difference between somebody working out an algorithm himself, facing and resolving challenges, going through an actual development and ideation process – and simply telling an AI to read available material (e.g. the PhD linked above) and then telling it to "come up with a plugin" without actually understanding what's going on. The latter is very clearly the case here.

    I'm not going to criticise someone for using Claude Code to delegate writing code (I do so myself), but using Claude to conceive the actual algorithm, do the research as well as responding to user feedback is something different. It really shows.
  • pavljenko
    pavljenko Posts: 42
    SCarewe said:
    You're missing the point. This is not about the font programme. It's about how "you" conceived your tool and are communicating about it.

    There is a huge difference between somebody working out an algorithm himself, facing and resolving challenges, going through an actual development and ideation process – and simply telling an AI to read available material (e.g. the PhD linked above) and then telling it to "come up with a plugin" without actually understanding what's going on. The latter is very clearly the case here.

    I'm not going to criticise someone for using Claude Code to delegate writing code (I do so myself), but using Claude to conceive the actual algorithm, do the research as well as responding to user feedback is something different. It really shows.
    You’re right, I didn’t spend years on academic research. Instead, I used Claude to quickly solve a specific pain point for designers. And it works in most cases—the tool is free, open-source, and solves the problem here and now.

    This product was created to bring value to the community, not for academic debates. If you’ve found specific bugs in the code, I’d welcome a pull request on GitHub. I’m not interested in discussing the philosophy of using AI.
  • I’m curious about your background and what led you to develop this kerning script with Claude. Did you study graphic design, typography, or type design, or is your background primarily technical or IT-related? Have you had any practical experience working with typefaces and kerning? I’d also be interested to know what sparked your interest in this particular area of typography.

  • pavljenko said:
    You see, Simon, the only essential characteristic of a tool is whether it works and produces results.

    As Deng Xiaoping used to say
    Even if you were correct about functionality being the only important characteristic of a tool (I tend to also be a fan of ethics), that would make it more important for you to be able to understand and reason about how to evaluate it.

    I have to admit that Deng Xiaoping is not actually one of my political heroes.
  • pavljenko said:
    So you think a font program can have the same side effects as the things you listed? If so, you’re missing one more thing — a camera that might steal your soul.
    AI absolutely does have a significant environmental impact. But this is getting quite off topic.

  • pavljenko
    pavljenko Posts: 42
    I’m curious about your background and what led you to develop this kerning script with Claude.

    I design fonts, though I'm careful with the word “professional”: type design is a deep field, and I still learn something new in it every day. It started as a side interest: I drew display fonts for my graphic design clients and didn't care much about encoding or clean outlines. Later I did a master's degree; my thesis was on judging display typefaces from an art-history point of view.

    The rule comes from a program of mine that I used to clean up the outlines of my fonts. I wanted spacing and kerning to take less time. Then I made the FontLab version with Claude, and your testing and comments here help me a lot. I published it so that more people can try it and send bugs and wishes. I have no other interest in it.

    Translated and edited by Claude (AI).

  • pavljenko
    pavljenko Posts: 42
    Even if you were correct about functionality being the only important characteristic of a tool (I tend to also be a fan of ethics), that would make it more important for you to be able to understand and reason about how to evaluate it.

    I have to admit that Deng Xiaoping is not actually one of my political heroes.

    Your ideas about ethics would have been greatly appreciated by the Luddites, but alas, they have died out, and their heirs are so close to you in their views that it would hardly be possible to tell you apart, even with the help of AI. And the fact that you don't like Deng Xiaoping as much as he would clearly have wished, had he not died long before he could even theoretically have learned of your existence, does not make a cat that catches mice any less functional just because someone takes it into their head to consider its colour as well. That, as I see it, is exactly the problem with your approach: you tend to love yourself in art, not art in yourself. Or, simply put, to declare something wrong whenever you don't like it, isn't that so?

    Translated by Claude (AI).

  • John Hudson
    John Hudson Posts: 3,875
    And it works in most cases...
    Does it, though?

    Can we take a moment to talk about why you think spacing is a ‘specific pain point’ for designers? I will accept that some amount of the work of kerning (special spacing) is a pain point, mostly because of the time it takes, but setting of sidebearings (general spacing) is part of the work of design, just as much as creating the shapes and defining their outlines. A tool that automates spacing implies that spacing is something that is applied to shapes after they are made, but I am always spacing as I go, gradually building up the shapes and their relationships at the same time. If spacing is a paint point, maybe you’re doing it wrong?
  • pavljenko
    pavljenko Posts: 42
    Does it, though?

    Can we take a moment to talk about why you think spacing is a ‘specific pain point’ for designers? I will accept that some amount of the work of kerning (special spacing) is a pain point, mostly because of the time it takes, but setting of sidebearings (general spacing) is part of the work of design, just as much as creating the shapes and defining their outlines. A tool that automates spacing implies that spacing is something that is applied to shapes after they are made, but I am always spacing as I go, gradually building up the shapes and their relationships at the same time. If spacing is a paint point, maybe you’re doing it wrong?

    Does my script work in most cases or not? That is the question I am putting to the community, and that is exactly why it was published. If in your opinion it doesn't work, write to me, and I will think about how to fix it. And contribute to the development of tools that make work on fonts simpler, faster and more convenient.

    As for your remark that maybe I am doing something wrong if spacing is a pain for me: here I disagree with you, because this is essentially your approach, not a general rule. It is right for a font drawn from scratch, over a long time and with attention to detail, very meticulously. But it does not cover the cases where the script can be useful for spacing: for example, when adding Cyrillic to an existing Latin; when you want to fix someone else's or old fonts with uneven sidebearings; when fonts were made in editors where the sidebearings are zero or are set automatically by a built-in algorithm; or when you want a quick check of which glyphs stand out from the colour.

    Besides, my script actually supports your method: in a font whose sidebearings are not set yet, if you space n and o by eye, the remaining glyphs are adjusted to them automatically, and according to the calculations, for an average font with an even design such refinements take away the routine. But of course, the colour of the font is set by the designer, and the script only fits the glyphs that stand out to it, rather than imposing its own.

    Translated by Claude (AI).

  • Typedesigner
    Typedesigner Posts: 132
    edited October 26

    FontLab 8 already has a built-in autokerning algorithm. However, as with many of FontLab 8’s features, the documentation is rather limited, particularly with regard to the underlying calculation method.

    Have you compared the results produced by your script with those generated by FontLab 8’s built-in autokerning algorithm? If so, what are the main differences in the results and in the underlying calculation methods?

  • pavljenko
    pavljenko Posts: 42
    Have you compared the results produced by your script with those generated by FontLab 8’s built-in autokerning algorithm? If so, what are the main differences in the results and in the underlying calculation methods?

    No, I haven't compared them. A fair comparison would need hundreds of fonts, and I'm not sure how to choose a sample that would make it objective.

    For me the main difference is the workflow: Autokerner does everything in one window, and as far as I can tell, this is a bit less convenient in FontLab. For John Hudson's way of working, FontLab's interface may suit better. These are different tasks and different uses.

    I could run such a test on the fonts I have collected from open sources, about 9,000 of them. But after the arguments here about AI, I doubt the community would welcome it.

    Translated and edited by Claude (AI).

  • pavljenko
    pavljenko Posts: 42
    pavljenko said:
    No, I haven't compared them.

    Correction: early on I did a quick check on two of my own fonts, with an early version of the script. FontLab's Auto Space nearly zeroed the sidebearings of straight stems (h, b, d), and its autokerning gave To, Ta, Va the same weak value (−18 against about −60 by hand) and left 15 pairs overlapping. Autokerner stayed much closer to my hand spacing, though it missed a few pairs on sharp shapes (AT, LT, AV). Two fonts are not a fair test, of course.

    Translated and edited by Claude (AI).

  • Typedesigner
    Typedesigner Posts: 132
    edited October 26

    What I would improve about your Spacing-sidebearings function is the consistent application of spacing across all font weights, from Thin to Black. Thin should have wider spacing between letters, while Black should have tighter spacing. Your current script doesn’t seem to apply this consistently yet.

  • pavljenko
    pavljenko Posts: 42
    What I would improve about your Spacing-sidebearings function is the consistency of spacing across all font weights, from Thin to Black. The sidebearings should be adjusted to maintain visually balanced spacing, with Thin generally having wider spacing and Black tighter spacing. Your current script doesn’t appear to apply this consistently yet.

    You're right about this. I checked it on five variable fonts. I also found two bugs and fixed them in 0.5.4, and the fixes now let you set the difference between masters. I don't want to make it a general setting, but if you like looser spacing or a project calls for it, you can do it yourself: space n and o by eye in the lightest and the heaviest master, and the weights in between will follow them. The overall density is set by the “From zero: H side” number.

    Translated and edited by Claude (AI).

  • pavljenko
    pavljenko Posts: 42

    @Typedesigner, a small off-topic question: why is your profile private, and what is your name? After all the talk about AI here, I've started to worry that I might be talking to an AI agent :)

    Kind regards from Sasha Pavljenko and the AI agent Claude.

  • My profile is private because I prefer to avoid unnecessary spam. Typedesigner is the name of my website.

  • pavljenko
    pavljenko Posts: 42
    edited October 26
    My profile is private because I prefer to avoid unnecessary spam. Typedesigner is the name of my website.

    Nice to meet you! By the way, in one of the latest versions I added German to the FontLab script, and I published it on a German typography forum.

    Translated by Claude (AI).

  • Thomas Phinney
    Thomas Phinney Posts: 3,220
    For me, the relevant tests of whether the script does an adequate job are assessed at the whole font level, not just that it gets more glyphs or pairs right than not. The percentages of good, and how bad the bad are, are of course important as well.

    I do find pavljenko’s continuous improvements and tweaks based on new feedback admirable.

    But there is also dismissiveness and hostility to certain criticisms, and using AI in place of understanding, rather than merely to supplement or implement... ugh.
  • pavljenko
    pavljenko Posts: 42
    edited October 27
    But there is also dismissiveness and hostility to certain criticisms, and using AI in place of understanding, rather than merely to supplement or implement... ugh.

    Thomas, my golden rule in conversation is the one Dr. Lecter put so well in the famous film: quid pro quo. I treat people the way they treat me, so I never show disrespect to anyone who hasn't shown disrespect to me.

    I'm a kind, open person, and I'm for a diversity of opinions and for diversity in general. But if someone in a discussion speaks unfairly, they should be ready for an answer from me, and I won't go easy on them because of their contributions to the industry.

    You may have noticed that in this thread every comment about how the script actually works got a warm welcome from me and was taken into work almost at once, in whole or in part. But comments from AI Luddites, who never even bothered to install the script and see how it works, yet turned sharply against it only because it was made with Claude, leave me puzzled at the very least, and at most amused and sorry for them. Still, I bear them no ill will.

    P.S. I'd like to clarify, I'm not calling you an AI Luddite. Perhaps you're an AI skeptic, but you at least took the trouble to look at how the script actually works: if I understood you correctly, your first comment here was about how well it does its job.

    Translated and edited by Claude (AI).

  • @Simon Cozens I think you are setting an unnecessarily high bar for what an autokerning script should achieve, while overlooking the economic reality of type design.

    Font production has to be economically viable. If a script can automate much of the kerning process, saving time and reducing costs, it is valuable even if the results need some manual refinement. The sensible approach is to automate the repetitive work and let the designer focus on the details that require an experienced eye.

    We have seen this debate before. When digital design tools emerged, traditionalists worried about losing craftsmanship. By the same logic, a type designer should still have to draw circles by hand. Yet today, we let software do that because it is faster and more precise. Nobody considers this a loss of design expertise.

    Automation doesn't replace craftsmanship; it frees up time for the work that actually requires it. The relevant question isn't whether an autokerning algorithm is perfect, but whether it helps produce a professionally good font more efficiently. Quality, time and cost all matter.

  • I think software should be good, yes. But I also think software should be free, so the economic realities should be suitable.

    The key problem with automating "much" of the kerning process is "how much"? If you don't know how much and you still need to check each pair, then you haven't automated anything.
  • One advantage of good kerning software is its ability to produce consistent results by applying systematic spacing principles. Manual kerning, by contrast, involves a degree of subjectivity: some designers prefer tighter spacing, while others favor a more open feel. Software can therefore offer an advantage in consistency and reproducibility, although consistent results do not necessarily translate into better optical balance.
  • pavljenko
    pavljenko Posts: 42
    If you're referring to me, I happily accept the label of Luddite

    Simon, first of all I apologise if my words hurt you or those who supported you. I'm glad you've turned the discussion constructive, even though our views on the ethics of AI differ a lot. Unlike some others here, you do give useful comments on the script between the lines, your last one included.

    A comma generally needs this kind of correction factor. Well, what if it doesn't? What if the shape of that glyph is not what you expect?

    You're right about the tables. Letters are spaced and kerned by their shapes, but punctuation and symbols follow norms from professional fonts, not a random mix, and figures next to punctuation have fixed limits, so an unusual comma follows the table.

    Georgian. Ethiopic. Cherokee. Tengwar.

    The reference letters are the English and Russian alphabets, so these are out of scope, but show me examples and ask, and I'll try to add them.

    Let's suppose you have an open licensed collection of 9000 fonts; I don't know of such a collection, but let's imagine.

    It's 8,876 font files, 8,060 of them TTF/OTF, 5,257 of those under the OFL. The 78 professional families I measure against, among them open ones such as Inter, Noto Sans and Golos, are kept apart from it and chosen by origin, not by the script's own measure.

    You gave a number of test results above, but you do not seem to have reflected much on the danger of testing the algorithm against itself.

    Testing by area proves little, I agree: it's the script's own measure. The comparison with the designers on Willis's nine open fonts is a different test, but the last check is by eye, and no kerning tool can do without the designer's taste. That's why you can now space n and o by eye in a font spaced from scratch, and the script follows them.

    If you don't know how much and you still need to check each pair, then you haven't automated anything.

    You don't have to check each pair: before Apply, the window lists every sidebearing change and the largest kerning changes (all of them for any glyph you look up), and any of them can be unticked.

    The reason I did download your script and test it is to see how well it handles unexpected glyph shapes. It does not do well.

    Could you name the fonts it handled badly, so I know what you mean and don't take it as said for effect?

    Translated and edited by Claude (AI).

  • pavljenko said:

    You're right about the tables. Letters are spaced and kerned by their shapes, but punctuation and symbols follow norms from professional fonts, not a random mix, and figures next to punctuation have fixed limits, so an unusual comma follows the table.
    So talk me through this. Letters can be kerned by their shapes. Symbols can't. Why not? Why are symbols special? Can numbers be kerned by their shapes? How special does something have to be for it not to be "kerning by its shape"? Don't designers kern everything "by its shape"? Shapes are all there are.
  • pavljenko
    pavljenko Posts: 42
    Letters can be kerned by their shapes. Symbols can't. Why not? Why are symbols special?

    They can, and they are. My sentence was wrong, not the script: every glyph that sits in a line of text is kerned by its shape, symbols included. In Forum a comma gets −80 after T, −28 after o and −17 after n; a plus gets −68 after T and nothing after n. The only thing that depends on the kind of glyph is how much of the gap is closed, and the kind is read from where the ink sits: low like a comma, high like quotes, middle like a hyphen.

    Can numbers be kerned by their shapes?

    Yes. Proportional figures are kerned by shape with each other and with everything else. Tabular ones aren't kerned with each other, since equal width is their point. Next to a comma, period or colon a limit keeps 7,4 from colliding.

    Don't designers kern everything "by its shape"? Shapes are all there are.

    For kerning, yes, and so does the script. The table is for sidebearings only: of 35 punctuation marks, and of symbols in a font with no spacing at all. The white-area measure that spaces letters gives a period or a dash a negative width, so marks are measured against the stem of n instead and kept between the quartiles of twenty well-spaced fonts. Inside that range the designer's spacing is left alone: in Forum, 19 of 35 marks don't move. Shapes are all there are, but a period doesn't have much of one.

    Translated by AI.

  • Jacques Le Bailly
    Jacques Le Bailly Posts: 100
    edited October 27
    Your approach to kerning and spacing is like many other apps. You are trying to solve it by looking at the outside (silhouette) of glyphs. Spacing and kerning is much more about balance and rhythm from all parts of the glyphs. The counters, the apertures, the contrast (differences between thick and thin strokes), the kind of type, the purpose of the design etc. etc.

    So like many said before, you will never be able to find an one way solution. At most you will be able to generate a starting point. If so, controlling and reviewing this will take you as much time as doing it by hand. IMHO

    Yes, I am one of those dinosaurs that still does everything by hand. Why ? Because spacing and kerning has a major part in the end result. You can make a bad design look good/readable by adding the right spacing and kerning. But you can also destroy a good design with bad spacing and kerning.
  • pavljenko
    pavljenko Posts: 42
    Your approach to kerning and spacing is like many other apps. You are trying to solve it by looking at the outside (silhouette) of glyphs. Spacing and kerning is much more about balance and rhythm from all parts of the glyphs. The counters, the apertures, the contrast (differences between thick and thin strokes), the kind of type, the purpose of the design etc. etc.

    So like many said before, you will never be able to find an one way solution. At most you will be able to generate a starting point. If so, controlling and reviewing this will take you as much time as doing it by hand. IMHO

    Yes, I am one of those dinosaurs that still does everything by hand. Why ? Because spacing and kerning has a major part in the end result. You can make a bad design look good/readable by adding the right spacing and kerning. But you can also destroy a good design with bad spacing and kerning.

    Your approach to making type commands respect. But that doesn't make this tool unviable.

    But you can also destroy a good design with bad spacing and kerning.

    I don't think this tool can destroy a good design, because it doesn't work as one button you press and take the result on faith. It's a script with quite broad settings: it automates what can be automated, and whatever harms your particular project you can simply switch off.

    Translated by AI.