diff --git a/OTFbuild/calligra_font_tests.odt b/OTFbuild/calligra_font_tests.odt index 712c3ed..bc51ce2 100644 Binary files a/OTFbuild/calligra_font_tests.odt and b/OTFbuild/calligra_font_tests.odt differ diff --git a/OTFbuild/font_builder.py b/OTFbuild/font_builder.py index 58378fe..f75d928 100644 --- a/OTFbuild/font_builder.py +++ b/OTFbuild/font_builder.py @@ -373,8 +373,8 @@ def build_font(assets_dir, output_path, no_bitmap=False, no_features=False): fea_stream = io.StringIO(fea_code) addOpenTypeFeatures(font, fea_stream) # Obtain raw .fea text for debugging - # with open("debugout_features.fea", "w") as text_file: - # text_file.write(fea_code) + with open("debugout_features.fea", "w") as text_file: + text_file.write(fea_code) print(" Features compiled successfully") except Exception as e: print(f" [WARNING] Feature compilation failed: {e}") diff --git a/OTFbuild/opentype_features.py b/OTFbuild/opentype_features.py index 225feb9..601d9b8 100644 --- a/OTFbuild/opentype_features.py +++ b/OTFbuild/opentype_features.py @@ -1139,7 +1139,6 @@ def _generate_psts_anusvara(glyphs, has, conjuncts): Substitution triggers: - uni093E (AA-matra, directly before anusvara) - - uni094E (prishthamatra, reordered before consonant cluster) - uni0948 (AI-matra), uni094C (AU-matra), uni094F (AW-matra) - uF010C / uF010D (reph, directly before anusvara) @@ -1158,46 +1157,8 @@ def _generate_psts_anusvara(glyphs, has, conjuncts): body = [] - # 094E gap rules (longest-context-first). - # After dev2 reordering, 094E sits before the consonant cluster while - # anusvara sits at the end. Need rules with 1-5 intervening glyphs. - if has(0x094E): - gap_cps = set() - for cp in SC.DEVANAGARI_PRESENTATION_CONSONANTS: - if has(cp): gap_cps.add(cp) - for cp in SC.DEVANAGARI_PRESENTATION_CONSONANTS_HALF: - if has(cp): gap_cps.add(cp) - for cp in SC.DEVANAGARI_PRESENTATION_CONSONANTS_WITH_RA: - if has(cp): gap_cps.add(cp) - for cp in SC.DEVANAGARI_PRESENTATION_CONSONANTS_WITH_RA_HALF: - if has(cp): gap_cps.add(cp) - for _, _, result, _ in conjuncts: - if has(result): gap_cps.add(result) - # Open Ya/Half Ya (substituted by earlier psts rules in same lookup) - for cp in [0xF0108, 0xF0109]: - if has(cp): gap_cps.add(cp) - # Reph forms and below-base RA - for cp in [SC.DEVANAGARI_RA_SUPER, SC.DEVANAGARI_RA_SUPER_COMPLEX, - SC.DEVANAGARI_RA_SUB]: - if has(cp): gap_cps.add(cp) - # Signs and marks - for cp in (list(range(0x0900, 0x0903)) + [0x093C] + - # list(range(0x093A, 0x094D)) + - [0x094F, 0x0951] + list(range(0x0953, 0x0956))): - if has(cp): gap_cps.add(cp) - - if gap_cps: - gap_names = ' '.join(glyph_name(cp) for cp in sorted(gap_cps)) - body.append(f" @anusGap = [{gap_names}];") - for n_gaps in range(5, 0, -1): - gaps = ' @anusGap' * n_gaps - body.append( - f" sub {glyph_name(0x094E)}{gaps}" - f" {glyph_name(anusvara)}' lookup AnusvaraLower;" - ) - # Direct predecessor triggers - for cp in [0x093A, 0x093E, 0x0948, 0x094C, 0x094F]: + for cp in [0x093A, 0x0948, 0x094C, 0x094F]: if has(cp): body.append( f" sub {glyph_name(cp)}" @@ -1369,6 +1330,7 @@ def _generate_mark(glyphs, has): # and would bloat the GPOS table). _EXCLUDE_RANGES = ( range(0x3400, 0xA000), # CJK Unified Ideographs (Ext A + main) + range(0xAC00, 0xD7FF), # Hangul Syllables range(0x2800, 0x2900), # Braille ) all_bases = {} diff --git a/src/assets/tamil_extrawide_variable.tga b/src/assets/tamil_extrawide_variable.tga index 55ca80a..174b5f7 100644 --- a/src/assets/tamil_extrawide_variable.tga +++ b/src/assets/tamil_extrawide_variable.tga @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:df0eaea60ebfa8995faa48ecb7aa9ea2f94a5085877272375fab46c67f23afd2 +oid sha256:5b06e54f6426eb4790ce019151eff71568afa7d2c55f986977c0199c3d563240 size 491538 diff --git a/src/net/torvald/terrarumsansbitmap/gdx/TerrarumSansBitmap.kt b/src/net/torvald/terrarumsansbitmap/gdx/TerrarumSansBitmap.kt index b6fd3ce..cc7f782 100755 --- a/src/net/torvald/terrarumsansbitmap/gdx/TerrarumSansBitmap.kt +++ b/src/net/torvald/terrarumsansbitmap/gdx/TerrarumSansBitmap.kt @@ -1896,10 +1896,7 @@ class TerrarumSansBitmap( else if (c == 0x0902) { val hasReph = cPrev == DEVANAGARI_RA_SUPER || cPrev == DEVANAGARI_RA_SUPER_COMPLEX val effectivePrev = if (hasReph) seq4.getOrElse(i - 2) { -1 } else cPrev - // 094E (prishthamatra) is reordered before the consonant cluster, - // so scan backward to find it - val hasPrishthamatra = (1..5).any { j -> seq4.getOrElse(i - j) { -1 } == 0x094E } - if (effectivePrev in intArrayOf(0x093A, 0x093E, 0x0948, 0x094C, 0x094F) || hasPrishthamatra || hasReph) { + if (effectivePrev in intArrayOf(0x093A, 0x0948, 0x094C, 0x094F) || hasReph) { seq4[i] = DEVANAGARI_ANUSVARA_LOWER } } diff --git a/work_files/tamil_extrawide_variable.psd b/work_files/tamil_extrawide_variable.psd index b813b44..06c859e 100644 --- a/work_files/tamil_extrawide_variable.psd +++ b/work_files/tamil_extrawide_variable.psd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b8530066d29c0659e7399e8941e7bc014458e2facbe47692338dd2f1efff2c22 -size 454675 +oid sha256:a089229946c2fe5cc5c2c0865c1dcadceecfc3219ca58bf2a7c2719457bb965f +size 454689