Devanagari Auto-generated feature : ccmp


#1

I think the substitution below should not be in ccmp as it interferes when a umatra is applied to a rakar form.

When the last two lines are left uncommented, I get the following for Ka Halant Ra uMatra

image

Which is incorrect. When commented, I get the correct form:

image

The second glyph is the ra_uMatra-deva whose substitution is also present in blws:

Am I missing something?


#2

I haven’t worked on Devanagari fonts yet, but see that the shaping engine documentation for Devanagari doesn’t mention the ccmp feature at all. This means it’s undefined whether OpenType implementations will apply lookups for this feature at all, and if they do, at what stage of shaping a Devanagari glyph sequence.

In this particular case, it seems the ccmp feature is applied before the feature that forms the rakar form, thus preventing that form from being produced.

It probably would be safer to consistently rely on features listed on this page for Devanagari:
https://docs.microsoft.com/en-us/typography/script-development/devanagari