Repository navigation
Shape Tai Tham sakot after vowel signs without a dotted circle - #431
Merged
Merged
Conversation
U+1A60 TAI THAM SIGN SAKOT was classified as a halant, which the USE grammar only allows before vowel signs. In Tai Tham the sakot and its consonant can also follow vowel signs and vowel modifiers, so words like ᨩᩢ᩠ᨿ became broken clusters and got a dotted circle. Split the sakot off of H into its own Sk category and allow (Sk B)* after the vowel modifiers and a sakot-terminated cluster, as HarfBuzz does.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cause
In Tai Tham, a sakot (U+1A60) and the consonant after it can come after vowel signs, for example ᨩᩢ᩠ᨿ (U+1A29 U+1A62 U+1A60 U+1A3F). fontkit shapes these words with a dotted circle before the stacked consonant:
gen-use.jsclassifies the sakot asH(Indic syllabic categoryInvisible_Stacker). Inuse.machine,H Bis only allowed in the consonant modifiers, before the vowel signs. A sakot after a vowel sign starts a new syllable, which matchesbroken_clusterand gets a dotted circle.Fix
This follows HarfBuzz, which splits the sakot off of the halant into its own
Skcategory:Skis U+1A60, so it's no longer a halant for reordering (HarfBuzz'sis_halant_usedoesn't include it either).Sk Bis allowed whereverH Bis, and also as(Sk B)*after the vowel modifiers.sakot_terminated_cluster), which gets the same reordering as the other cluster types.The generated files are gitignored, so the diff is only the generator, the grammar and the shaper.
Across the 281 non-MORT/MORX cases of text-rendering-tests, this PR goes from 164 to 192 passing. The 28 fixed cases are all SHLANA, and no other results change. HarfBuzz 15.0.0 also passes 192. The MORT/MORX results are the same as master.
Tests
test/shaping.js: a new "shapes tai tham text" block with SHLANA-1/39, 2/11, 2/37, 6/3 and 7/8, plus two HarfBuzz cases: a sakot at the end of a syllable, and a lone vowel sign with a sakot, which still gets its dotted circle. Six of the seven fail on master. The output of all seven matches HarfBuzz glyph for glyph.TestShapeLana.ttffrom text-rendering-tests, added totest/data/fonttest/under the Apache License 2.0 intest/data/fonttest/LICENSE.txt.npm test: 710 passing.npm run format:checkpasses.This is independent of #428, #429 and #430.