Fix base-position when 'pref' is NOT formed
If pre-base reordering Ra is NOT formed (or formed and then broken up), we should consider that Ra as base. This is observable when there's a left matra or dotreph that positions before base. Now, it might be that we shouldn't do this if the Ra happend to form a below form. We can't quite deduce that right now... Micro test added. Also at: https://code.google.com/a/google.com/p/noto-alpha/issues/detail?id=186#c29
This commit is contained in:
parent
04dc52fa15
commit
1d634cbb4b
|
@ -1365,10 +1365,34 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
|
||||||
* cluster.
|
* cluster.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
bool try_pref = !!indic_plan->mask_array[PREF];
|
||||||
|
|
||||||
/* Find base again */
|
/* Find base again */
|
||||||
unsigned int base;
|
unsigned int base;
|
||||||
for (base = start; base < end; base++)
|
for (base = start; base < end; base++)
|
||||||
if (info[base].indic_position() >= POS_BASE_C) {
|
if (info[base].indic_position() >= POS_BASE_C)
|
||||||
|
{
|
||||||
|
if (try_pref && base + 1 < end && indic_plan->config->pref_len == 2)
|
||||||
|
{
|
||||||
|
for (unsigned int i = base + 1; i < end; i++)
|
||||||
|
if ((info[i].mask & indic_plan->mask_array[PREF]) != 0)
|
||||||
|
{
|
||||||
|
if (!(_hb_glyph_info_substituted (&info[i]) &&
|
||||||
|
_hb_glyph_info_ligated_and_didnt_multiply (&info[i])))
|
||||||
|
{
|
||||||
|
/* Ok, this was a 'pref' candidate but didn't form any.
|
||||||
|
* Base is around here... */
|
||||||
|
base = i;
|
||||||
|
while (base < end && is_halant_or_coeng (info[base]))
|
||||||
|
base++;
|
||||||
|
info[base].indic_position() = POS_BASE_C;
|
||||||
|
|
||||||
|
try_pref = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (start < base && info[base].indic_position() > POS_BASE_C)
|
if (start < base && info[base].indic_position() > POS_BASE_C)
|
||||||
base--;
|
base--;
|
||||||
break;
|
break;
|
||||||
|
@ -1603,7 +1627,7 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
|
||||||
* the following rules:
|
* the following rules:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (indic_plan->mask_array[PREF] && base + 1 < end) /* Otherwise there can't be any pre-base reordering Ra. */
|
if (try_pref && base + 1 < end) /* Otherwise there can't be any pre-base reordering Ra. */
|
||||||
{
|
{
|
||||||
unsigned int pref_len = indic_plan->config->pref_len;
|
unsigned int pref_len = indic_plan->config->pref_len;
|
||||||
for (unsigned int i = base + 1; i < end; i++)
|
for (unsigned int i = base + 1; i < end; i++)
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
226bc2deab3846f1a682085f70c67d0421014144.ttf
|
||||||
|
4cce528e99f600ed9c25a2b69e32eb94a03b4ae8.ttf
|
||||||
|
d629e7fedc0b350222d7987345fe61613fa3929a.ttf
|
||||||
|
e207635780b42f898d58654b65098763e340f5c7.ttf
|
||||||
|
f499fbc23865022234775c43503bba2e63978fe1.ttf
|
Binary file not shown.
|
@ -1 +1,2 @@
|
||||||
fonts/sha1sum/62927e416ab1fba8cc6222d97b2b0ba0e0eb00ea.ttf:U+0D2F,U+0D4D,U+0D30,U+0D46:[evowelsignmlym=0+1465|rapostmlym=0+499|yamlym=0+2120]
|
fonts/sha1sum/226bc2deab3846f1a682085f70c67d0421014144.ttf:U+0D2F,U+0D4D,U+0D30,U+0D46:[evowelsignmlym=0+1465|rapostmlym=0+499|yamlym=0+2120]
|
||||||
|
fonts/sha1sum/e207635780b42f898d58654b65098763e340f5c7.ttf:U+0D2F,U+0D4D,U+0D30,U+0D46:[yamlym=0+2120|viramamlym=0+0|evowelsignmlym=0+1465|ramlym=0+1507]
|
||||||
|
|
Loading…
Reference in New Issue