[indic-generator] Add a couple comments
This commit is contained in:
parent
91d6f45bc9
commit
2963154c15
|
@ -243,15 +243,18 @@ for k,new_cat in category_overrides.items():
|
||||||
data[k] = (new_cat, pos, block)
|
data[k] = (new_cat, pos, block)
|
||||||
|
|
||||||
# We only expect position for certain types
|
# We only expect position for certain types
|
||||||
|
positioned_categories = ('CM', 'SM', 'RS', 'H', 'M')
|
||||||
for k, (cat, pos, block) in data.items():
|
for k, (cat, pos, block) in data.items():
|
||||||
if cat not in ('CM', 'SM', 'RS', 'H', 'M'):
|
if cat not in positioned_categories:
|
||||||
pos = 'END'
|
pos = 'END'
|
||||||
data[k] = (cat, pos, block)
|
data[k] = (cat, pos, block)
|
||||||
|
|
||||||
# Position overrides are more complicated
|
# Position overrides are more complicated
|
||||||
|
|
||||||
|
# Keep in sync with CONSONANT_FLAGS in the shaper
|
||||||
|
consonant_categories = ('C', 'CS', 'Ra','CM', 'V', 'PLACEHOLDER', 'DOTTEDCIRCLE')
|
||||||
for k, (cat, pos, block) in data.items():
|
for k, (cat, pos, block) in data.items():
|
||||||
if cat in ('C', 'CS', 'Ra','CM', 'V', 'PLACEHOLDER', 'DOTTEDCIRCLE'):
|
if cat in consonant_categories:
|
||||||
pos = 'BASE_C'
|
pos = 'BASE_C'
|
||||||
data[k] = (cat, pos, block)
|
data[k] = (cat, pos, block)
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,9 @@ enum indic_category_t {
|
||||||
*
|
*
|
||||||
* We treat Vowels and placeholders as if they were consonants. This is safe because Vowels
|
* We treat Vowels and placeholders as if they were consonants. This is safe because Vowels
|
||||||
* cannot happen in a consonant syllable. The plus side however is, we can call the
|
* cannot happen in a consonant syllable. The plus side however is, we can call the
|
||||||
* consonant syllable logic from the vowel syllable function and get it all right! */
|
* consonant syllable logic from the vowel syllable function and get it all right!
|
||||||
|
*
|
||||||
|
* Keep in sync with consonant_categories in the generator. */
|
||||||
#define CONSONANT_FLAGS (FLAG (OT_C) | FLAG (OT_CS) | FLAG (OT_Ra) | MEDIAL_FLAGS | FLAG (OT_V) | FLAG (OT_PLACEHOLDER) | FLAG (OT_DOTTEDCIRCLE))
|
#define CONSONANT_FLAGS (FLAG (OT_C) | FLAG (OT_CS) | FLAG (OT_Ra) | MEDIAL_FLAGS | FLAG (OT_V) | FLAG (OT_PLACEHOLDER) | FLAG (OT_DOTTEDCIRCLE))
|
||||||
#define JOINER_FLAGS (FLAG (OT_ZWJ) | FLAG (OT_ZWNJ))
|
#define JOINER_FLAGS (FLAG (OT_ZWJ) | FLAG (OT_ZWNJ))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue