unsigned int limit = start;
if (indic_plan->mask_array[RPHF] &&
start + 3 <= end &&
- (/* TODO Handle other Reph modes. */
+ (
(indic_plan->config->reph_mode == REPH_MODE_IMPLICIT && !is_joiner (info[start + 2])) ||
(indic_plan->config->reph_mode == REPH_MODE_EXPLICIT && info[start + 2].indic_category() == OT_ZWJ)
))
base = start;
has_reph = true;
}
- };
+ } else if (indic_plan->config->reph_mode == REPH_MODE_LOG_REPHA && info[start].indic_category() == OT_Repha)
+ {
+ limit += 1;
+ while (limit < end && is_joiner (info[limit]))
+ limit++;
+ base = start;
+ has_reph = true;
+ }
switch (indic_plan->config->base_pos)
{
* base consonants.
*
* Only do this for unforced Reph. (ie. not for Ra,H,ZWJ. */
- if (has_reph && base == start && start + 2 == limit) {
+ if (has_reph && base == start && start - limit <= 2) {
/* Have no other consonant, so Reph is not formed and Ra becomes base. */
has_reph = false;
}