Bug in auto feature code for Thai

In version 1328, and maybe later versions, auto generated Thai CALT code is incorrect:

The highlighted line should not contain yoYing-thai.less or thoThan-thai.less. If .small belowmarks are included in a Thai font, they are used below only doChada/doChada.short and toPatak/toPatak.short. YoYing and thoThan don’t have descenders and always get the normal size belowmarks.

But they have this extra shape underneath? So the mark should be below that? When should the .less glyphs used, then?

The first rule substitutes the .less bases. Those take normal sized marks.

Right.

Another bug, sorry. In the fourth rule, loChula can also have a belowmark before the abovemarks (for example ฬุ่ ฬุ้ ฬุ๊ ฬุ๋ ฬู่ ฬู้ ฬู๊ ฬู๋). Currently this context is not included, so the loChula will remain tall. We need another rule, something like

sub loChula-thai' @belowmarks @abovemarks by loChula-thai.short;

or ignore belowmarks for the existing rule, of course.

If we add a class (e.g belowmarks or smallbelowmarks for Thai) manually and then enable ‘generate feature automatically’ and ‘update’ the class, we can get into trouble. In my client’s font those classes looked as though they were auto-generated and auto-updating, but we found a bug in the classes (glyphs in a different order) because they’re not classes that Glyphs can auto generate.