Tamil Auto-generated Features

Hi, I’m working on a Tamil font. I’ve made all the necessary glyphs under the Tamil glyph set and auto-generated the feature code, but a lot of ligature substitutions under the psts feature were not working so I had to write some code myself.

This is what I had to write:

#uMatra ligatures
sub ka-tamil uMatra-tamil by ka_uMatra-tamil;
sub ca-tamil uMatra-tamil by ca_uMatra-tamil;
sub tta-tamil uMatra-tamil by tta_uMatra-tamil;
sub ma-tamil uMatra-tamil by ma_uMatra-tamil;
sub ra-tamil uMatra-tamil by ra_uMatra-tamil;
sub ta-tamil uMatra-tamil by ta_uMatra-tamil;
sub rra-tamil uMatra-tamil by rra_uMatra-tamil;
sub la-tamil uMatra-tamil by la_uMatra-tamil;
sub llla-tamil uMatra-tamil by llla_uMatra-tamil;

#newly made uMatra ligatures
sub ja-tamil uMatra-tamil by ja_uMatra-tamil;
sub sha-tamil uMatra-tamil by sha_uMatra-tamil;
sub ssa-tamil uMatra-tamil by ssa_uMatra-tamil;
sub sa-tamil uMatra-tamil by sa_uMatra-tamil;
sub ha-tamil uMatra-tamil by ha_uMatra-tamil;
sub k_ssa-tamil uMatra-tamil by k_ssa_uMatra-tamil;

#uuMatra ligatures
sub ka-tamil uuMatra-tamil by ka_uuMatra-tamil;
sub nga-tamil uuMatra-tamil by nga_uuMatra-tamil;
sub ca-tamil uuMatra-tamil by ca_uuMatra-tamil;
sub tta-tamil uuMatra-tamil by tta_uuMatra-tamil;
sub pa-tamil uuMatra-tamil by pa_uuMatra-tamil;
sub ma-tamil uuMatra-tamil by ma_uuMatra-tamil;
sub ya-tamil uuMatra-tamil by ya_uuMatra-tamil;
sub ra-tamil uuMatra-tamil by ra_uuMatra-tamil;
sub lla-tamil uuMatra-tamil by lla_uuMatra-tamil;
sub llla-tamil uuMatra-tamil by llla_uuMatra-tamil;
sub va-tamil uuMatra-tamil by va_uuMatra-tamil;

#newly made iMatra ligatures
sub ka-tamil iMatra-tamil by ka_iMatra-tamil;
sub nga-tamil iMatra-tamil by nga_iMatra-tamil;
sub ca-tamil iMatra-tamil by ca_iMatra-tamil;
sub ja-tamil iMatra-tamil by ja_iMatra-tamil;
sub nya-tamil iMatra-tamil by nya_iMatra-tamil;
sub tta-tamil iMatra-tamil by tta_iMatra-tamil;
sub nna-tamil iMatra-tamil by na_iMatra-tamil;
sub ta-tamil iMatra-tamil by ta_iMatra-tamil;
sub na-tamil iMatra-tamil by na_iMatra-tamil;
sub nnna-tamil iMatra-tamil by nnna_iMatra-tamil;
sub pa-tamil iMatra-tamil by pa_iMatra-tamil;
sub ma-tamil iMatra-tamil by ma_iMatra-tamil;
sub ya-tamil iMatra-tamil by ya_iMatra-tamil;
sub ra-tamil iMatra-tamil by ra_iMatra-tamil;
sub rra-tamil iMatra-tamil by rra_iMatra-tamil;
sub la-tamil iMatra-tamil by la_iMatra-tamil;
sub lla-tamil iMatra-tamil by lla_iMatra-tamil;
sub llla-tamil iMatra-tamil by llla_iMatra-tamil;
sub va-tamil iMatra-tamil by va_iMatra-tamil;
sub sha-tamil iMatra-tamil by sha_iMatra-tamil;
sub ssa-tamil iMatra-tamil by ssa_iMatra-tamil;
sub sa-tamil iMatra-tamil by sa_iMatra-tamil;
sub ha-tamil iMatra-tamil by ha_iMatra-tamil;

#iiMatra ligatures
sub tta-tamil iiMatra-tamil by tta_iiMatra-tamil;

Is there something I’m overlooking so that I didn’t have to write all this, or is Glyphs just not generating code for those substitutions?

the “newly made” ligatures refer to additional glyphs I had to manually create that weren’t initially included in the Tamil glyph set. I feel these should be part of the original glyph set.

1 Like

Thank you for your input, this is very useful! I can confirm that for many of these, Glyphs does not autogenerate code. Since I am not an expert on Tamil, perhaps @m_nedumaran can chime in?

The automatic feature code should put all ligatures with iMatra, uMatra, iiMatra, uuMatra into psts, right?

CMIIW: You mean the following should be in the sidebar, in the Combining subcategory. And while we are at it, perhaps a better name for the subcategory. Ligatures instead of Combining maybe?

ka_iMatra-tamil
nga_iMatra-tamil
ca_iMatra-tamil
ja_iMatra-tamil
nya_iMatra-tamil
tta_iMatra-tamil
na_iMatra-tamil
ta_iMatra-tamil
na_iMatra-tamil
nnna_iMatra-tamil
pa_iMatra-tamil
ma_iMatra-tamil
ya_iMatra-tamil
ra_iMatra-tamil
rra_iMatra-tamil
la_iMatra-tamil
lla_iMatra-tamil
llla_iMatra-tamil
va_iMatra-tamil
sha_iMatra-tamil
ssa_iMatra-tamil
sa_iMatra-tamil
ha_iMatra-tamil

I believe so.

Yes you are right, I think they should be in the sidebar under the currently Combining category, from what I’ve seen included in other Tamil fonts. But I also want to say I’m not a native speaker or expert in Tamil in any means. To clarify, this is the full list of new glyphs I had to create:

ja_uMatra-tamil
sha_uMatra-tamil
ssa_uMatra-tamil
sa_uMatra-tamil
ha_uMatra-tamil
k_ssa_uMatra-tamil

ka_iMatra-tamil
nga_iMatra-tamil
ca_iMatra-tamil
ja_iMatra-tamil
nya_iMatra-tamil
tta_iMatra-tamil
na_iMatra-tamil
ta_iMatra-tamil
na_iMatra-tamil
nnna_iMatra-tamil
pa_iMatra-tamil
ma_iMatra-tamil
ya_iMatra-tamil
ra_iMatra-tamil
rra_iMatra-tamil
la_iMatra-tamil
lla_iMatra-tamil
llla_iMatra-tamil
va_iMatra-tamil
sha_iMatra-tamil
ssa_iMatra-tamil
sa_iMatra-tamil
ha_iMatra-tamil

Screencap of these glyphs just in case they would be helpful:

As you can see these are the simpler ligatures where the uMatra-tamil and iMatra-tamil
just get tacked on to the base glyph.

For the iMatra ligatures, instead of having individual glyphs you can also create different width variations of the iMatra-tamil to be tacked on, but I didn’t know how to write code for that so I just made each one manually.

I used the word Ligatures because that was what they were being referred to as under the Microsoft Script Development OpenType spec page. Hopefully someone native can decide which name would be more helpful/correct?

1 Like