[Indic] Better position left-matra in Malayalam
Just put it before base, which is what's expected. Malayalam failures down from 1559 to 1197 (0.114172%). BENGALI: 353988 out of 354285 tests passed. 297 failed (0.0838308%) DEVANAGARI: 693571 out of 693628 tests passed. 57 failed (0.00821766%) GUJARATI: 366489 out of 366506 tests passed. 17 failed (0.0046384%) GURMUKHI: 60750 out of 60809 tests passed. 59 failed (0.0970251%) KANNADA: 950956 out of 951913 tests passed. 957 failed (0.100534%) KHMER: 299094 out of 299124 tests passed. 30 failed (0.0100293%) MALAYALAM: 1047219 out of 1048416 tests passed. 1197 failed (0.114172%) ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%) SINHALA: 271699 out of 271847 tests passed. 148 failed (0.0544424%) TAMIL: 1091837 out of 1091837 tests passed. 0 failed (0%) TELUGU: 970524 out of 970573 tests passed. 49 failed (0.00504856%)
This commit is contained in:
parent
88f413b56f
commit
65c43accdc
|
@ -895,13 +895,22 @@ final_reordering_syllable (hb_buffer_t *buffer,
|
||||||
* halant, position is moved after it.
|
* halant, position is moved after it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (start < base) /* Otherwise there can't be any pre-base matra characters. */
|
if (start + 1 < end && start < base) /* Otherwise there can't be any pre-base matra characters. */
|
||||||
|
{
|
||||||
|
/* If we lost track of base, alas, position before last thingy. */
|
||||||
|
unsigned int new_pos = base == end ? base - 2 : base - 1;
|
||||||
|
|
||||||
|
/* Malayalam does not have "half" forms or explicit virama forms.
|
||||||
|
* The glyphs formed by 'half' are Chillus. We want to position
|
||||||
|
* matra after them all.
|
||||||
|
*/
|
||||||
|
if (buffer->props.script != HB_SCRIPT_MALAYALAM)
|
||||||
{
|
{
|
||||||
unsigned int new_pos = base - 1;
|
|
||||||
while (new_pos > start &&
|
while (new_pos > start &&
|
||||||
!(is_one_of (info[new_pos], (FLAG (OT_M) | FLAG (OT_H) | FLAG (OT_Coeng)))))
|
!(is_one_of (info[new_pos], (FLAG (OT_M) | FLAG (OT_H) | FLAG (OT_Coeng)))))
|
||||||
new_pos--;
|
new_pos--;
|
||||||
/* If we found no Halant we are done (just need to update clusters).
|
|
||||||
|
/* If we found no Halant we are done.
|
||||||
* Otherwise only proceed if the Halant does
|
* Otherwise only proceed if the Halant does
|
||||||
* not belong to the Matra itself! */
|
* not belong to the Matra itself! */
|
||||||
if (is_halant_or_coeng (info[new_pos]) &&
|
if (is_halant_or_coeng (info[new_pos]) &&
|
||||||
|
@ -910,7 +919,13 @@ final_reordering_syllable (hb_buffer_t *buffer,
|
||||||
/* -> If ZWJ or ZWNJ follow this halant, position is moved after it. */
|
/* -> If ZWJ or ZWNJ follow this halant, position is moved after it. */
|
||||||
if (new_pos + 1 < end && is_joiner (info[new_pos + 1]))
|
if (new_pos + 1 < end && is_joiner (info[new_pos + 1]))
|
||||||
new_pos++;
|
new_pos++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
new_pos = start; /* No move. */
|
||||||
|
}
|
||||||
|
|
||||||
|
if (start < new_pos)
|
||||||
|
{
|
||||||
/* Now go see if there's actually any matras... */
|
/* Now go see if there's actually any matras... */
|
||||||
for (unsigned int i = new_pos; i > start; i--)
|
for (unsigned int i = new_pos; i > start; i--)
|
||||||
if (info[i - 1].indic_position () == POS_PRE_M)
|
if (info[i - 1].indic_position () == POS_PRE_M)
|
||||||
|
|
|
@ -58,3 +58,4 @@
|
||||||
ള്
|
ള്
|
||||||
ള്യം
|
ള്യം
|
||||||
ള്ള
|
ള്ള
|
||||||
|
ല്പ്പേ
|
||||||
|
|
Loading…
Reference in New Issue