Copy kerning from Glyphs to text editor

How to copy all kerning info from Glyphs to a plain text editor? I’d like to do some manual and automated replacing in the text editor. I couldn’t find any way to do this. Exporting kerning to a text file would do fine as well.

You could open the .glyphs file in a text editor.

There is a script in my GitHub that exports kerning to a CSV file. But none yet that can reimport it. :slight_smile:
How quickly would you need that?

@Georg Wow the Glyphs file is all in text format, that’s a nice surprise! Parsing trough a 5Mb text file surely isn’t the most convenient way, but it’ll get the job done. I haven’t checked yet, is the Glyphs format and the kerning window data exactly the same? I mean, if I have the same file open both in text editor and in Glyphs, can I just paste new kerning to Glyphs from the text editor?

@Mekkablue I tried your script, but it’s not working (nothing happens) in my system, I guess because it’s old (OS 10.6.8, Glyphs build 1.4.3 b575).

There must be some error message in the Macro Window.

Ah yes, here:

Traceback (most recent call last):
File “Export Kerning CSV.py”, line 37, in
File “/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC/ob jc/_convenience.py”, line 355, in getitem__objectAtIndex
return container_unwrap(self.objectAtIndex
(idx), RuntimeError)
ValueError: depythonifying ‘unsigned long long’, got ‘objc.pyobjc_unicode’

Hmmm. When did you last download my scripts? Make sure you have the latest version. Also possible that there is a problem with 10.6.

Is there a way to edit the kern data, for example: expand all kerning pairs by 10 Units? (The above mentioned export script would somehow work if you could reimport it again…)
Thanks!

Yes, there is a script for that in my GitHub repository. Look for an ‘Adjust Kerning’ script in the Metrics subfolder:
https://github.com/mekkablue/Glyphs-Scripts

The readme explains how to install the scripts.

Great, thanks!
One more question: The centre glyph script seems not to be working? There is nothing happening at all

ABC_XYZ
It was fixed yesterday.

Just updated your scripts, the error persists. Must be a OS problem then, I guess. I could use the script in another machine, but then there should be a way to reimport it back to Glyphs.

By the way, can I copy features from one Glyphs project onto another?

Yes. select them in the sidebar of the font info window and copy, open the font info of the other font, click in the sidebar and paste.

Oh of course, thanks.