Is there a way to set kerning value for all masters at once via GUI?

i mean on entering the the value for kerning between two pairs or classes via GUI, an optional shortcut key to set value for all masters(like option key in menus), i know kerning values are different in many situation for different masters but (you know better than me) tiny features like that make things easier.

How many pairs like this are in your typeface?


And how many “regular” pairs?

~400 on each master, i’m trying to add whole glyphs(upper/lowercase) and punctuations.

(i feel you want to point that there is not that much pairs in a good space-tuned font to consider such feature, right? it’s ok, i thought it should be or would be nice to have)

So you have halve the kerning different and have the same between masters?

I don’t think that adding a modifier to edit the kerning in all masters will work. They are all taken for the kerning with the keyboard. So I think syncing it afterwards is a better option. Either by a script that copies the kerning for the current pair to all masters or edit one master and then copy all the kerning pairs to the other masters. That depends if it is clearly defined what pairs need to be synced. e.g. all pairs with certain glyphs.

Why are so many pairs that do need the same kerning? Are those glyphs the same? Can you explain a bit more what and why are you doing this?

i have a 300 and a 700 master on weight axis(display font) with almost same side bearing for glyphs on both masters(none-intentional practice, looking good enough), so kernings are the same.

i go back and forth between masters to set same kerning values and comes in mind it should exist sth. i have no problem with that at all. thank you.

I had a similar question and was wondering what might be the best way to go about it.

While it would be nice to set up a series of kerning string in edit view for select masters, and then kern one and see how that same value works for the others…I fear that if there was a modifier key for this that it might lead to some accidental clicking (because it’s already difficult enough to remember all the existing spacing/kerning shortcuts) and cause unintentional changes to other masters.

One idea is to use Kern-A-Lytics. There is an Equalize Pairs button that will Set all pairs to be the same value as the currently selected UFO

I forget if it is possible but after you equalize, you might be able to select the masters you want and click the increase +/- 10 button.

If all pairs are the same, you can use the “Link Metrics With First Master” custom parameter on the second master. But that will link everything.

To have both single and all pairs in sync and avoid accidental shortcut presses, it would be nice to use masters in formulas (why not both kerning and metrics): =Regular or ==Regular or even =Regular*0.2.


Interesting idea.

Until the setting kerning with formulas dream comes true…

Any chance someone has a snippet for copying all kerning pairs from a select master to another (set of) master(s)?

Cmd-A, Cmd-C, Cmd-V works well for me.

sorry, should have specified via scripting

1 Like

Maybe Rainer’s script Copy Layer to Layer could be modified to include that.

1 Like
# copies all kerning from sourceMaster to targetMasters

sourceMaster = Font.masters[0]
targetMasters = [ Font.masters[1] ]

# delete current kerning from targetMasters
for master in targetMasters:
	Font.kerning[ ] = {}

for leftKey, rightKeys in Font.kerning[ ].items():
	for rightKey, value in rightKeys.items():
		# if no group, get glyph name
		if '@MMK' not in leftKey:
			leftKey = Font.glyphForId_(leftKey).name
		if '@MMK' not in rightKey:
			 rightKey = Font.glyphForId_(rightKey).name
		for targetMaster in targetMasters:
			Font.setKerningForPair(, leftKey, rightKey, value)

1 Like

That works perfectly. Thank you Alex!

It is supposed to be like this:

sourceMaster = Font.masters[0]
targetMasters = [Font.masters[1], Font.masters[2]]

sourceKerning = Font.kerning[]
for targetMaster in targetMasters:
	targetKerning = sourceKerning.deepMutableCopy()
	Font.kerning[] = targetKerning

But there was a small problem in the wrapper. Will work in the next version.


Oh nice! Is there any logic or a way to know what is deep-copyable and what is not? Sometimes I stay away from those methods even if dir shows them because not sure how reliable it is, how deep it goes and so on.

All the GS objects are deep copied even when you just copy them.

Other than that you need to try. You can try to print the repr() of the original and the copy to see if all elements are different.

1 Like