[indic] If Malayalam dot-reph formed a ligature, don't move it
Rachana-0.6 implements dot-reph by ligation, so we shouldn't move it. Uniscribe doesn't either. Test case: U+0D4E,U+0D1A,U+0D4D,U+0D1A,U+0D4D
This commit is contained in:
parent
a01cbf6cbe
commit
65a929b1c0
|
@ -1320,12 +1320,23 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
|
||||||
* before post-base consonant forms, and after post-base consonant forms.
|
* before post-base consonant forms, and after post-base consonant forms.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* If there's anything after the Ra that has the REPH pos, it ought to be halant.
|
/* Two cases:
|
||||||
* Which means that the font has failed to ligate the Reph. In which case, we
|
*
|
||||||
* shouldn't move. */
|
* - If repha is encoded as a sequence of characters (Ra,H or Ra,H,ZWJ), then
|
||||||
if (start + 1 < end &&
|
* we should only move it if the sequence ligated to the repha form.
|
||||||
info[start].indic_position() == POS_RA_TO_BECOME_REPH &&
|
*
|
||||||
info[start + 1].indic_position() != POS_RA_TO_BECOME_REPH)
|
* - If repha is encoded separately and in the logical position, we should only
|
||||||
|
* move it if it did NOT ligate. If it ligated, it's probably the font trying
|
||||||
|
* to make it work without the reordering.
|
||||||
|
*/
|
||||||
|
if (start + 1 < end && (
|
||||||
|
(info[start].indic_category() != OT_Repha &&
|
||||||
|
info[start].indic_position() == POS_RA_TO_BECOME_REPH &&
|
||||||
|
info[start + 1].indic_position() != POS_RA_TO_BECOME_REPH)
|
||||||
|
||
|
||||||
|
(info[start].indic_category() == OT_Repha &&
|
||||||
|
!is_a_ligature (info[start]))
|
||||||
|
))
|
||||||
{
|
{
|
||||||
unsigned int new_reph_pos;
|
unsigned int new_reph_pos;
|
||||||
reph_position_t reph_pos = indic_plan->config->reph_pos;
|
reph_position_t reph_pos = indic_plan->config->reph_pos;
|
||||||
|
|
|
@ -10,3 +10,6 @@
|
||||||
ഗ്ഗോ
|
ഗ്ഗോ
|
||||||
ഗ്ഗ
|
ഗ്ഗ
|
||||||
ഗ്രോ
|
ഗ്രോ
|
||||||
|
ൎകു
|
||||||
|
ൎക്കു
|
||||||
|
ൎച്ച്
|
||||||
|
|
Loading…
Reference in New Issue