Setting default sidebearing links and kern groups?

Just wondering… in each new Thai font I make, I’m linking the sidebearings of certain glyphs, for example:

LSB: ก determines ฌญณถฤฤๅ; ท determines นพฟห.
RSB: ม determines ฆฒ; ก determines คฎฏภฤลฦว.

Kern groups will behave the same way.

As far as I can tell, there isn’t a way for the sidebearing references to be stored somewhere in the defaults when generating Thai glyphs. Would it be possible to add new fields to the glyphData.XML or somewhere else, so that we don’t have to manually type these in each time? I’m pretty sure similar relationships exist for all scripts (so LSB and kern group of ‘o’ would determine ‘c, d, e, q’ for example). Of course users should be able to override those settings, in the same way they get to remove anchors or decompose components in the current XML implementation.

There is a script in my repo that does the filling in. I made it a script and not a feature to let you extend it.

1 Like

I found the set Kerning Groups.py script, is that the one you mean? Can it also set sidebearing keys, or just kerning keys as the title suggests?

There’s no way to store this info in a glyphData.xml file so new glyphs have the desired references when they’re created?

Storing it in the GlyphData is not a good idea as you might need several sets. Think if the left Metrics Key for the lowercase ‘a’ in upright and italic.

The script is only made to apply kerning groups but it should be easily adjusted to also set metrics keys.

I see, thanks for explaining :smiley: