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

**URL:** <https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681>\
**Category:** Glyphs\
**Tags:** kerning\
**Created:** [January 4, 2023, 8:12pm UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681 "2023-01-04T20:12:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![aminabedi68](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/aminabedi68/32/20105_2.png) [@aminabedi68](https://forum.glyphsapp.com/u/aminabedi68)\
**Post date:** [January 4, 2023, 8:12pm UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/1 "2023-01-04T20:12:26Z")

</div>

Hi  
is there a way to set kerning values in GUI at once for all masters? (like shift+enter shortcut key or something like that? i take a look at site and handbook but couldn’t find it, if not predicted or implemented, hopefully could be an idea)

---

<div class="post-metadata">

**Author:** ![SCarewe](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/scarewe/32/18952_2.png) [@SCarewe](https://forum.glyphsapp.com/u/SCarewe)\
**Post date:** [January 4, 2023, 8:42pm UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/2 "2023-01-04T20:42:07Z")

</div>

What do you mean? Do you want to set a kerning value for a single pair in all masters, or copy the complete kerning from one master to another?

---

<div class="post-metadata">

**Author:** ![aminabedi68](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/aminabedi68/32/20105_2.png) [@aminabedi68](https://forum.glyphsapp.com/u/aminabedi68)\
**Post date:** [January 4, 2023, 8:56pm UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/3 "2023-01-04T20:56:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [January 4, 2023, 9:22pm UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/4 "2023-01-04T21:22:15Z")

</div>

How many pairs like this are in your typeface?

---

<div class="post-metadata">

**Author:** ![aminabedi68](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/aminabedi68/32/20105_2.png) [@aminabedi68](https://forum.glyphsapp.com/u/aminabedi68)\
**Post date:** [January 5, 2023, 4:54am UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/5 "2023-01-05T04:54:27Z")

</div>

~400

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [January 5, 2023, 6:51am UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/6 "2023-01-05T06:51:31Z")

</div>

And how many “regular” pairs?

---

<div class="post-metadata">

**Author:** ![aminabedi68](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/aminabedi68/32/20105_2.png) [@aminabedi68](https://forum.glyphsapp.com/u/aminabedi68)\
**Post date:** [January 5, 2023, 7:35am UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/7 "2023-01-05T07:35:48Z")

</div>

~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)

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [January 5, 2023, 10:59am UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/8 "2023-01-05T10:59:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![aminabedi68](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/aminabedi68/32/20105_2.png) [@aminabedi68](https://forum.glyphsapp.com/u/aminabedi68)\
**Post date:** [January 5, 2023, 5:44pm UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/9 "2023-01-05T17:44:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gor.jious](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/gor.jious/32/9472_2.png) [@gor.jious](https://forum.glyphsapp.com/u/gor.jious)\
**Post date:** [January 5, 2023, 7:03pm UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/10 "2023-01-05T19:03:11Z")

</div>

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](https://github.com/schriftgestalt/kernalytics-rf-ext). 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.

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [January 5, 2023, 8:50pm UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/11 "2023-01-05T20:50:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![alexs](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/a/2acd7d/32.png) [@alexs](https://forum.glyphsapp.com/u/alexs)\
**Post date:** [January 5, 2023, 10:40pm UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/12 "2023-01-05T22:40:01Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [January 5, 2023, 11:22pm UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/13 "2023-01-05T23:22:22Z")

</div>

Interesting idea.

---

<div class="post-metadata">

**Author:** ![gor.jious](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/gor.jious/32/9472_2.png) [@gor.jious](https://forum.glyphsapp.com/u/gor.jious)\
**Post date:** [January 6, 2023, 6:49pm UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/14 "2023-01-06T18:49:34Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![George\_Thomas](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/g/c77e96/32.png) [@George\_Thomas](https://forum.glyphsapp.com/u/George_Thomas)\
**Post date:** [January 6, 2023, 6:59pm UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/15 "2023-01-06T18:59:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gor.jious](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/gor.jious/32/9472_2.png) [@gor.jious](https://forum.glyphsapp.com/u/gor.jious)\
**Post date:** [January 6, 2023, 6:59pm UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/16 "2023-01-06T18:59:47Z")

</div>

sorry, should have specified via scripting

---

<div class="post-metadata">

**Author:** ![George\_Thomas](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/g/c77e96/32.png) [@George\_Thomas](https://forum.glyphsapp.com/u/George_Thomas)\
**Post date:** [January 6, 2023, 7:01pm UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/17 "2023-01-06T19:01:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![alexs](https://forum.glyphsapp.com/letter_avatar_proxy/v4/letter/a/2acd7d/32.png) [@alexs](https://forum.glyphsapp.com/u/alexs)\
**Post date:** [January 6, 2023, 8:08pm UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/18 "2023-01-06T20:08:53Z")

</div>

```auto
# 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[master.id] = {}

for leftKey, rightKeys in Font.kerning[sourceMaster.id].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( targetMaster.id, leftKey, rightKey, value)

```

---

<div class="post-metadata">

**Author:** ![gor.jious](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/gor.jious/32/9472_2.png) [@gor.jious](https://forum.glyphsapp.com/u/gor.jious)\
**Post date:** [January 6, 2023, 8:16pm UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/19 "2023-01-06T20:16:04Z")

</div>

That works perfectly. Thank you Alex!

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [January 6, 2023, 10:40pm UTC](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681/20 "2023-01-06T22:40:48Z")

</div>

It is supposed to be like this:

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

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

```

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

[Next page](https://forum.glyphsapp.com/t/is-there-a-way-to-set-kerning-value-for-all-masters-at-once-via-gui/24681.md?page=2)
