diff --git a/OTFbuild/calligra_font_tests.odt b/OTFbuild/calligra_font_tests.odt index 17b552e..687354a 100644 Binary files a/OTFbuild/calligra_font_tests.odt and b/OTFbuild/calligra_font_tests.odt differ diff --git a/OTFbuild/opentype_features.py b/OTFbuild/opentype_features.py index b4dd79a..9a69bf0 100644 --- a/OTFbuild/opentype_features.py +++ b/OTFbuild/opentype_features.py @@ -552,6 +552,18 @@ def _generate_devanagari(glyphs, has, replacewith_subs=None): f" sub {glyph_name(ra_int)} {glyph_name(0x200D)} {glyph_name(SC.DEVANAGARI_VIRAMA)} {glyph_name(ya_int)} by {glyph_name(RYA)}; # RYA" ) + # ISCII eyelash-RA: RRA + virama -> eyelash-RA, RA + virama + ZWJ -> eyelash-RA + rra_int = SC.to_deva_internal(0x0931) + EYELASH_RA = 0xF010B + if has(ra_int) and has(0x200D) and has(SC.DEVANAGARI_VIRAMA) and has(EYELASH_RA): + akhn_subs.append( + f" sub {glyph_name(ra_int)} {glyph_name(SC.DEVANAGARI_VIRAMA)} {glyph_name(0x200D)} by {glyph_name(EYELASH_RA)}; # eyelash-RA (RA+H+ZWJ)" + ) + if has(rra_int) and has(SC.DEVANAGARI_VIRAMA) and has(EYELASH_RA): + akhn_subs.append( + f" sub {glyph_name(rra_int)} {glyph_name(SC.DEVANAGARI_VIRAMA)} by {glyph_name(EYELASH_RA)}; # eyelash-RA (RRA+H)" + ) + ka_int = SC.to_deva_internal(0x0915) ssa_int = SC.to_deva_internal(0x0937) ja_int = SC.to_deva_internal(0x091C) @@ -655,6 +667,11 @@ def _generate_devanagari(glyphs, has, replacewith_subs=None): half_subs.append( f" sub {glyph_name(RYA)} {glyph_name(SC.DEVANAGARI_VIRAMA)} by {glyph_name(HALF_RYA)};" ) + # Eyelash-RA's half form is itself + if has(EYELASH_RA) and has(SC.DEVANAGARI_VIRAMA): + half_subs.append( + f" sub {glyph_name(EYELASH_RA)} {glyph_name(SC.DEVANAGARI_VIRAMA)} by {glyph_name(EYELASH_RA)};" + ) if half_subs: features.append("feature half {\n script dev2;\n" + '\n'.join(half_subs) + "\n} half;")