Store kern list in-file?
Posted: 27 Aug 2021
Hi Tim,
I've found some usefulness in editing the pair_frequencies.txt file, adding some pairs that are missing, or taking out some pairs we don't want kerned. It's great that the list is accessible to the user!
I have a few different pair_frequencies.txt files I've been trying out, and so to swap them out I find I have to do a lot of this: close Glyphs, rename text files, re-open Glyphs. Plus, I feel a little funny about messing around in the plugin files like that, seeing as the files will get overwritten if I need to update Kern On.
I was wondering if you could additionally look for a key in the font (or master's) user data to access a custom pair frequencies list? If missing, KernOn could use the text file in the plugin package, but if present it could use the provided list:
(psudo code)
```
Glyphs.font.userData["KernOnPairFrequencies"] = [
("KO", 123456),
("ON", 123455),
...
]
# Kern on would use pairs "KO", "ON", etc
del Glyphs.font.userData["KernOnPairFrequencies"]
# Kern on would use pairs in the default pair_frequencies.txt list: "in", "er", etc
```
What do you think?
I've found some usefulness in editing the pair_frequencies.txt file, adding some pairs that are missing, or taking out some pairs we don't want kerned. It's great that the list is accessible to the user!
I have a few different pair_frequencies.txt files I've been trying out, and so to swap them out I find I have to do a lot of this: close Glyphs, rename text files, re-open Glyphs. Plus, I feel a little funny about messing around in the plugin files like that, seeing as the files will get overwritten if I need to update Kern On.
I was wondering if you could additionally look for a key in the font (or master's) user data to access a custom pair frequencies list? If missing, KernOn could use the text file in the plugin package, but if present it could use the provided list:
(psudo code)
```
Glyphs.font.userData["KernOnPairFrequencies"] = [
("KO", 123456),
("ON", 123455),
...
]
# Kern on would use pairs "KO", "ON", etc
del Glyphs.font.userData["KernOnPairFrequencies"]
# Kern on would use pairs in the default pair_frequencies.txt list: "in", "er", etc
```
What do you think?