Refactor
This commit is contained in:
parent
5e4e21fce4
commit
617f4ac46f
|
@ -250,6 +250,7 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff
|
||||||
{
|
{
|
||||||
hb_glyph_info_t *info = buffer->info;
|
hb_glyph_info_t *info = buffer->info;
|
||||||
|
|
||||||
|
|
||||||
/* 1. Find base consonant:
|
/* 1. Find base consonant:
|
||||||
*
|
*
|
||||||
* The shaping engine finds the base consonant of the syllable, using the
|
* The shaping engine finds the base consonant of the syllable, using the
|
||||||
|
@ -267,6 +268,7 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff
|
||||||
unsigned int base = end;
|
unsigned int base = end;
|
||||||
bool has_reph = false;
|
bool has_reph = false;
|
||||||
|
|
||||||
|
{
|
||||||
/* -> If the syllable starts with Ra + Halant (in a script that has Reph)
|
/* -> If the syllable starts with Ra + Halant (in a script that has Reph)
|
||||||
* and has more than one consonant, Ra is excluded from candidates for
|
* and has more than one consonant, Ra is excluded from candidates for
|
||||||
* base consonants. */
|
* base consonants. */
|
||||||
|
@ -282,7 +284,6 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff
|
||||||
has_reph = true;
|
has_reph = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
{
|
|
||||||
/* -> starting from the end of the syllable, move backwards */
|
/* -> starting from the end of the syllable, move backwards */
|
||||||
unsigned int i = end;
|
unsigned int i = end;
|
||||||
do {
|
do {
|
||||||
|
@ -314,7 +315,7 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff
|
||||||
} while (i > limit);
|
} while (i > limit);
|
||||||
if (base < start)
|
if (base < start)
|
||||||
base = start; /* Just in case... */
|
base = start; /* Just in case... */
|
||||||
}
|
|
||||||
|
|
||||||
/* -> If the syllable starts with Ra + Halant (in a script that has Reph)
|
/* -> If the syllable starts with Ra + Halant (in a script that has Reph)
|
||||||
* and has more than one consonant, Ra is excluded from candidates for
|
* and has more than one consonant, Ra is excluded from candidates for
|
||||||
|
@ -323,6 +324,7 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff
|
||||||
/* Have no other consonant, so Reph is not formed and Ra becomes base. */
|
/* Have no other consonant, so Reph is not formed and Ra becomes base. */
|
||||||
has_reph = false;
|
has_reph = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* 2. Decompose and reorder Matras:
|
/* 2. Decompose and reorder Matras:
|
||||||
|
|
Loading…
Reference in New Issue