Lines Matching refs:base

162 			 * - The ones that are GenCat=Mn are already positioned visually, ie. after base. (eg. Khmer)
165 * We recategorize the first kind to look like a Nukta and attached to the base directly.
438 /* 1. Find base consonant:
440 * The shaping engine finds the base consonant of the syllable, using the
442 * until a consonant is found that does not have a below-base or post-base
443 * form (post-base forms have to follow below-base forms), or that is not a
444 * pre-base reordering Ra, or arrive at the first consonant. The consonant
445 * stopped at will be the base.
449 * base consonants.
452 $base = $end;
459 * base consonants. */
473 $base = $start;
481 $base = $start;
495 /* -> that does not have a below-base or post-base form
496 * (post-base forms have to follow below-base forms), */
498 $base = $i;
505 /* -> or that is not a pre-base reordering Ra,
509 * Our pre-base reordering Ra's are marked POS_POST_C, so will be skipped
514 * be the base. */
515 $base = $i;
517 /* A ZWJ after a Halant stops the base search, and requests an explicit
524 $base = $i;
537 /* In scripts without half forms (eg. Khmer), the first consonant is always the base. */
540 $base = $limit;
543 /* Find the last base consonant that is not blocked by ZWJ. If there is
544 * a ZWJ right before a base consonant, that would request a subjoined form. */
550 $base = $i;
556 for ($i = $base + 1; $i < $end; $i++) {
569 * base consonants.
573 if ($has_reph && $base == $start && $limit - $base <= 2) {
574 /* Have no other consonant, so Reph is not formed and Ra becomes base. */
612 for ($i = $start; $i < $base; $i++) {
616 if ($base < $end) {
617 $info[$base]['indic_position'] = self::POS_BASE_C;
622 for ($i = $base + 1; $i < $end; $i++) {
642 /* For old-style Indic script tags, move the first post-base Halant after
646 for ($i = $base + 1; $i < $end; $i++) {
689 /* Re-attach ZWJ, ZWNJ, and halant to next char, for after-base consonants. */
691 for ($i = $base + 1; $i < $end; $i++) {
706 /* Move Coeng+RO (Halant,Ra) sequence before base consonant. */
707 for ($i = $base + 1; $i < $end; $i++) {
722 for ($i = $base + 1; $i < $end; $i++) {
737 /* Find a Coeng+RO (Halant,Ra) sequence and mark it for pre-base processing. */
739 for ($i = $base; $i < $end - 1; $i++) { /* KHMER_FIX_1 From $start (not base) */
764 /* Find base again */
765 $base = $end;
768 $base = $i;
781 /* Pre-base */
783 for ($i = $start; $i < $base; $i++) {
788 /* Post-base */
790 for ($i = $base + 1; $i < $end; $i++) {
798 /* Find a (pre-base) Consonant, Halant,Ra sequence and mark Halant|Ra for below-base BLWF processing. */
800 if (($base - $start) >= 3) {
801 for ($i = $start; $i < ($base - 2); $i++) {
824 * "The feature 'below-base form' is applied to consonants
825 * having below-base forms and following the base consonant.
827 * as well as below the base glyph. The feature 'below-base
839 for ($i = $start; ($i + 1) < $base; $i++) {
841 ($i + 2 == $base || $info[$i + 2]['indic_category'] != self::OT_ZWJ)) {
849 if (count($GSUBdata['pref']) && $base + 2 < $end) {
850 /* Find a Halant,Ra sequence and mark it for pre-base processing. */
851 for ($i = $base + 1; $i + 1 < $end; $i++) {
873 // ZWNJ should block H C from forming blwf post-base - need to unmask backwards beyond first consonant arrived at //
922 /* Find base again */
923 for ($base = $start; $base < $end; $base++) {
924 if ($info[$base]['indic_position'] >= self::POS_BASE_C) {
925 if ($start < $base && $info[$base]['indic_position'] > self::POS_BASE_C) {
926 $base--;
931 if ($base == $end && $start < $base && $info[$base - 1]['indic_category'] != self::OT_ZWJ) {
932 $base--;
934 while ($start < $base && isset($info[$base]) && ($info[$base]['indic_category'] == self::OT_H || $info[$base]['indic_category'] == self::OT_N)) {
935 $base--;
941 * If a pre-base matra character had been reordered before applying basic
950 if ($start + 1 < $end && $start < $base) { /* Otherwise there can't be any pre-base matra characters. */
951 /* If we lost track of base, alas, position before last thingy. */
952 $new_pos = ($base == $end) ? $base - 2 : $base - 1;
984 if ($old_pos < $base && $base <= $new_pos) { /* Shouldn't actually happen. */
985 $base--;
1000 * before post-base consonant forms, and after post-base consonant forms.
1012 /* 1. If reph should be positioned after post-base consonant forms,
1019 /* 2. If the reph repositioning class is not after post-base: target
1034 while ($new_reph_pos < $base && !self::is_halant_or_coeng($info[$new_reph_pos])) {
1038 if ($new_reph_pos < $base && self::is_halant_or_coeng($info[$new_reph_pos])) {
1040 if ($new_reph_pos + 1 < $base && self::is_joiner($info[$new_reph_pos + 1])) {
1049 * consonant that is not a potential pre-base reordering Ra.
1052 $new_reph_pos = $base;
1053 /* XXX Skip potential pre-base reordering Ra. */
1062 /* 4. If reph should be positioned before post-base consonant, find
1063 * first post-base classified consonant not ligated with main. If no
1069 $new_reph_pos = $base;
1080 * immediately before the first post-base matra, syllable modifier
1083 * is post-main, it will skip above-base matras that also have a
1089 while ($new_reph_pos < $base && !self::is_halant_or_coeng($info[$new_reph_pos])) {
1093 if ($new_reph_pos < $base && self::is_halant_or_coeng($info[$new_reph_pos])) {
1095 if ($new_reph_pos + 1 < $base && self::is_joiner($info[$new_reph_pos + 1])) {
1120 for ($i = $base + 1; $i < $new_reph_pos; $i++) {
1133 if ($start < $base && $base <= $new_reph_pos) {
1134 $base--;
1139 /* o Reorder pre-base reordering consonants:
1141 * If a pre-base reordering consonant is found, reorder it according to
1146 if (count($GSUBdata['pref']) && $base + 1 < $end) { /* Otherwise there can't be any pre-base reordering Ra. */
1147 for ($i = $base + 1; $i < $end; $i++) {
1156 * 2. Try to find a target position the same way as for pre-base matra.
1157 * If it is found, reorder pre-base consonant glyph.
1162 $new_pos = $base;
1177 for ($i = $base + 1; $i < $old_pos; $i++) {
1196 if ($new_pos <= $base && $base < $old_pos) {
1197 $base++;