Hi! In G2 it was possible to load kerning strings from a txt file (easy to update the strings once, and simply reload the file on multiple computers). Is this no longer possible in G3?
How do you mean? I am not familiar with this feature, but this sounds like an ideal opportunity for a script. Can you describe how you want it to work? Maybe I can quickly write something.
From what I can tell, this simply copies the text from the imported file, but does not dynamically update the text if the file is changed. Writing this in a script wouldn’t be too difficult: Just copy the contents of a .txt file into the sample strings, nothing more. Is that what you are looking for?
Then again, I can’t find the documentation for the sample strings in the Python doc, or in the core doc. Is this accessible? (@FlorianPircher)
In Glyphs 3, sample strings are stored as a list of dictionaries where each dictionary has two keys, name (the name of the sample string as shown in the sidebar in the sample string preferences) and text (the actual sample string).
Have a look at this code from the @mekkablue scripts that appends a new sample strings entry to the existing sample strings:
Yes. Having a file stored somewhere (sometimes even next to the source files) that can be updated and then locally loaded (even if not dynamically updated) seemed like a cleaner process. Not sure why that function has disappeared.
Thank you! I was looking at Rainer’s Sample String Maker, but didn’t find anything in that direction. Should have just checked the other script, too ![]()
I’ll have a look at this.
Over the years, I have put together a group of test files. I just copy the text and paste it into the kerning window–very easy
Hi, I ran into the same issue. I have several file.txt files that I reuse over the years. However, there seems to be a bug with setting / sample string . When I choose the “Import” option, all my sample strings are erased, and I’m unable to actually import a file, even thought they look selectable compared to another file format.
Instead, I have to manually copy and paste the text. It appears that Glyphs suggests importing is possible, but using the option just clears all the sample strings. Am I missing something?
The import expects special .plist file (you can check the format by exporting a file).
I fixed it that a) it would not remove anything if the import failed. and b) it imports .txt files at one new entry to the list.
