Virama conjunct+Mc width fix#223
Closed
jquast wants to merge 2 commits into
Closed
Conversation
After careful review of Virama width calculation and study of uucode, two related changes:
- Bugfix Invisible_Stacker viramas now form conjuncts (Burmese, Khmer, etc.)
Discovered while analyzing Burmese, found in ``IndicSyllabicCategory.txt``, "causes conjunct
formation", added in Unicode 14.0:
# Indic_Syllabic_Category=Invisible_Stacker
#
# Invisible stacker (usually kills inherent vowel of consonant; is not visible
# by itself; causes conjunct formation or consonant
# stacking)
So this logically belongs with the others in ``_ISC_VIRAMA_SET``. Use code generation instead of
the copy and paste done before, this set would have changed in several past unicode releases and
so may change again in the future.
- Change Virama+consonant width calculation to match @jacobsandlund's uucode (ghostty)
Our previous implementation was perhaps too complex, but more "giving" for width compared to
uucode's implementation, and neither of ours really has any basis in standards, seems to be of
taste. contour's libunicode does not make concern for virama, and uucode's does, measurement
is simpler to implement and will probably improve performance, see code comment::
# Virama codepoints (Indic_Syllabic_Category=Virama|Invisible_Stacker)
# are treated as zero-width combining marks, matching Ghostty's uucode
# library. Whether a virama+consonant sequence should collapse to 1 or
# 2 cells is undefined by Unicode; we follow uucode's (1).
…idth Mc following a virama conjunct (C+V+C) was adding width +1. The Mc closes the conjunct and accounts for its 1-cell contribution, it should not add its own. I'm not sure this is directly spelled by any specification, following uucode/ghostty measurements, here.
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.
bugfix Virama conjunct: Mc following a conjunct adds no independent width
Mc following a virama conjunct (C+V+C) was adding width +1. The Mc
closes the conjunct and accounts for its 1-cell contribution, it should
not add its own. I'm not sure this is directly spelled by any
specification, following uucode/ghostty measurements, here.