How to change all my Kerning Pairs into multiples of 8?

Anyone knows if this feature already exists in a plug in or script?
Thank you in advance.

M.

I don’t know whether such a script is published, but this function does that:

def round_kerning(round_value, font):
    for master in font.masters:
        master_kerning = font.kerning[master.id]
        for left in master_kerning.keys():
            left_kerning = master_kerning[left]
            for right in left_kerning.keys():
                value = round_value * round(left_kerning[right] / round_value)
                left_kerning[right] = value

round_kerning(8, Font)
2 Likes

Script > mekkablue > Kerning > Adjust Kerning.

1 Like

Thank you Sebastian, I will definitely try it!

Hello Rainer, Sebastian already answer with a solution!. I aim to implement this after using Kern-On, this plugin don’t have this customization yet (I asked on KO forum and it is something for future development). I think KO is very promising and I want to use the same grid spacing units than my font dimensions & metrics (8).

This is the link from Kern On Forum.
https://kern-on.com/forum/viewtopic.php?t=4336&sid=6c274bba1ffa1565514236a84646de04

Best!

Thanks for the code, Sebastian!

For me, this question arises:

When we do quantization, do we want to do this on the basis of plain rounding, so as to minimize the error? Or, always round towards zero, because “too weak” kerning is better than “too strong”? Or, possibly we always want to round up because we decide that too loose is always better than too tight, even for positive kerning values?

2 Likes