[Indic] Improve Sinhala base algorithm and reph positioning
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 24 Jul 2012 03:51:29 +0000 (23:51 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 24 Jul 2012 03:51:29 +0000 (23:51 -0400)
commit34c215036f5fcdc7599b1ab0591b56dbb3811902
tree89969400a1225f1ec5fd352fda37a2d72d797a49
parent2ec934c6c25423e7af20d909a9c698a149808ea9
[Indic] Improve Sinhala base algorithm and reph positioning

Sinhala does not have half forms.  And most (all?) consonants can be
base, except when preceded by ZWJ, which would request a subjoined form.
Hence switch the base algorithm to categorize with Khmer, start search
at start, and stop at a ZWJ.

Also, mark all pos=base consonants after base to be subjoined.  Mark
base itself to have pos=base.

Finally, adjust Sinhala's reph position to after-main.

Brings down Sinhala failures from 455 to 328 (0.120656%).
src/hb-ot-shape-complex-indic.cc
test/shaping/texts/in-tree/shaper-indic/indic/script-sinhala/misc/misc.txt