Lines Matching defs:OTLdata

73 	var $OTLdata;
128 $this->OTLdata = [];
173 $OTLdata = [];
199 $OTLdata[$subchunk][$charctr]['general_category'] = $ucd_record[0];
200 $OTLdata[$subchunk][$charctr]['bidi_type'] = $ucd_record[2];
202 //$OTLdata[$subchunk][$charctr]['combining_class'] = $ucd_record[1];
203 //$OTLdata[$subchunk][$charctr]['bidi_type'] = $ucd_record[2];
204 //$OTLdata[$subchunk][$charctr]['mirrored'] = $ucd_record[3];
205 //$OTLdata[$subchunk][$charctr]['east_asian_width'] = $ucd_record[4];
206 //$OTLdata[$subchunk][$charctr]['normalization_check'] = $ucd_record[5];
207 //$OTLdata[$subchunk][$charctr]['script'] = $ucd_record[6];
212 $OTLdata[$subchunk][$charctr]['group'] = 'M';
214 $OTLdata[$subchunk][$charctr]['group'] = 'S';
217 $OTLdata[$subchunk][$charctr]['group'] = 'C';
220 $OTLdata[$subchunk][$charctr]['uni'] = $char;
221 $OTLdata[$subchunk][$charctr]['hex'] = $charasstr;
227 $this->OTLdata = $OTLdata[$sch];
313 for ($i = 0; $i < count($this->OTLdata); $i++) {
314 if ($this->OTLdata[$i]['uni'] == 8204 || $this->OTLdata[$i]['uni'] == 8205) {
315 array_splice($this->OTLdata, $i, 1);
318 $this->schOTLdata[$sch] = $this->OTLdata;
319 $this->OTLdata = [];
352 // Sets $this->OTLdata[$i]['wordend']=true at possible end of word boundaries
356 // Sets $this->OTLdata[$i]['wordend']=true at possible end of word boundaries
441 for ($i = 0; $i < count($this->OTLdata); $i++) {
447 if ($this->OTLdata[$i]['uni'] == 0x0640) {
448 $this->OTLdata[$i]['GPOSinfo']['kashida'] = 8; // Put before the next character
453 elseif ($this->OTLdata[$i]['uni'] == 0xFEB3 || $this->OTLdata[$i]['uni'] == 0xFEB4 || $this->OTLdata[$i]['uni'] == 0xFEBB || $this->OTLdata[$i]['uni'] == 0xFEBC) {
455 while (isset($this->OTLdata[$checkpos]) && strpos($this->GlyphClassMarks, $this->OTLdata[$checkpos]['hex']) !== false) {
458 if (isset($this->OTLdata[$checkpos])) {
459 $this->OTLdata[$checkpos]['GPOSinfo']['kashida'] = 7; // Put after marks on next character
465 elseif ($this->OTLdata[$i]['uni'] == 0xFE94 || $this->OTLdata[$i]['uni'] == 0xFEA2 || $this->OTLdata[$i]['uni'] == 0xFEAA) {
466 $this->OTLdata[$i]['GPOSinfo']['kashida'] = 6;
471 elseif ($this->OTLdata[$i]['uni'] == 0xFE8E || $this->OTLdata[$i]['uni'] == 0xFEC2 || $this->OTLdata[$i]['uni'] == 0xFEDE || $this->OTLdata[$i]['uni'] == 0xFEDA || $this->OTLdata[$i]['uni'] == 0xFB93) {
472 $this->OTLdata[$i]['GPOSinfo']['kashida'] = 5;
478 elseif ($this->OTLdata[$i]['uni'] == 0xFEAE || $this->OTLdata[$i]['uni'] == 0xFEF2 || $this->OTLdata[$i]['uni'] == 0xFEF0 || $this->OTLdata[$i]['uni'] == 0xFEF4 || $this->OTLdata[$i]['uni'] == 0xFBE9 || $this->OTLdata[$i]['uni'] == 0xFBFD || $this->OTLdata[$i]['uni'] == 0xFBFF
481 while (isset($this->OTLdata[$checkpos]) && strpos($this->GlyphClassMarks, $this->OTLdata[$checkpos]['hex']) !== false) {
484 if (isset($this->OTLdata[$checkpos]) && $this->OTLdata[$checkpos]['uni'] == 0xFE92) {
485 $this->OTLdata[$checkpos]['GPOSinfo']['kashida'] = 4; // ******* Before preceding BAA
491 elseif ($this->OTLdata[$i]['uni'] == 0xFEEE || $this->OTLdata[$i]['uni'] == 0xFECA || $this->OTLdata[$i]['uni'] == 0xFED6 || $this->OTLdata[$i]['uni'] == 0xFED2) {
492 $this->OTLdata[$i]['GPOSinfo']['kashida'] = 3;
505 if (!isset($this->OTLdata[$i]['GPOSinfo']['kashida'])) {
506 if (strpos($this->GSUBdata[$this->GSUBfont]['finals'], $this->OTLdata[$i]['hex']) !== false) { // ANY OTHER FINAL FORM
507 $this->OTLdata[$i]['GPOSinfo']['kashida'] = 2;
508 } elseif (strpos('0FEAE 0FEF0 0FEF2', $this->OTLdata[$i]['hex']) !== false) { // not already included in 5 above
509 $this->OTLdata[$i]['GPOSinfo']['kashida'] = 1;
533 for ($ptr = 1; $ptr < count($this->OTLdata); $ptr++) {
534 if ($this->OTLdata[$ptr]['general_category'] == Ucdn::UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK && $this->OTLdata[$ptr - 1]['uni'] == 32) {
535 $this->OTLdata[$ptr - 1]['uni'] = 0xa0;
536 $this->OTLdata[$ptr - 1]['hex'] = '000A0';
547 for ($ptr = 0; $ptr < count($this->OTLdata); $ptr++) {
548 $char = $this->OTLdata[$ptr]['uni'];
566 array_splice($this->OTLdata, $ptr, 1, $newinfo);
571 if ($char == 0x09AF && isset($this->OTLdata[$ptr + 1]) && $this->OTLdata[$ptr + 1]['uni'] == 0x09BC) {
581 array_splice($this->OTLdata, $ptr, 2, $newinfo);
589 foreach ($this->OTLdata as $eid => $c) {
590 Indic::set_indic_properties($this->OTLdata[$eid], $scriptblock); // sets ['indic_category'] and ['indic_position']
595 $indic_category_string .= Indic::$indic_category_char[$this->OTLdata[$eid]['indic_category']];
600 Indic::set_syllables($this->OTLdata, $indic_category_string, $broken_syllables);
602 Indic::set_syllables_sinhala($this->OTLdata, $indic_category_string, $broken_syllables);
604 Indic::set_syllables_khmer($this->OTLdata, $indic_category_string, $broken_syllables);
631 Indic::initial_reordering($this->OTLdata, $this->GSUBdata[$this->GSUBfont], $broken_syllables, $indic_config, $scriptblock, $is_old_spec, $dottedcircle);
650 Indic::final_reordering($this->OTLdata, $this->GSUBdata[$this->GSUBfont], $indic_config, $scriptblock, $is_old_spec);
685 foreach ($this->OTLdata as $eid => $c) {
686 Myanmar::set_myanmar_properties($this->OTLdata[$eid]); // sets ['myanmar_category'] and ['myanmar_position']
687 $myanmar_category_string .= Myanmar::$myanmar_category_char[$this->OTLdata[$eid]['myanmar_category']];
690 Myanmar::set_syllables($this->OTLdata, $myanmar_category_string, $broken_syllables);
710 Myanmar::reordering($this->OTLdata, $this->GSUBdata[$this->GSUBfont], $broken_syllables, $dottedcircle);
743 foreach ($this->OTLdata as $eid => $c) {
744 Sea::set_sea_properties($this->OTLdata[$eid], $scriptblock); // sets ['sea_category'] and ['sea_position']
749 $sea_category_string .= Sea::$sea_category_char[$this->OTLdata[$eid]['sea_category']];
753 Sea::set_syllables($this->OTLdata, $sea_category_string, $broken_syllables);
784 Sea::initial_reordering($this->OTLdata, $this->GSUBdata[$this->GSUBfont], $broken_syllables, $scriptblock, $dottedcircle);
796 Sea::final_reordering($this->OTLdata, $this->GSUBdata[$this->GSUBfont], $scriptblock);
852 for ($ptr = 0; $ptr < count($this->OTLdata); $ptr++) {
853 $char = $this->OTLdata[$ptr]['uni'];
871 $this->OTLdata[$ptr] = $newinfo[0]; // Substitute SARA_AM => SARA_AA
875 while (isset($this->OTLdata[$ptr - 1 - $ntones]) && (
876 ($this->OTLdata[$ptr - 1 - $ntones]['uni'] & ~0x0080) == 0x0E31 ||
877 (($this->OTLdata[$ptr - 1 - $ntones]['uni'] & ~0x0080) >= 0x0E34 &&
878 ($this->OTLdata[$ptr - 1 - $ntones]['uni'] & ~0x0080) <= 0x0E37) ||
879 (($this->OTLdata[$ptr - 1 - $ntones]['uni'] & ~0x0080) >= 0x0E47 &&
880 ($this->OTLdata[$ptr - 1 - $ntones]['uni'] & ~0x0080) <= 0x0E4E)
899 array_splice($this->OTLdata, $ptr - $ntones, 0, $newinfo);
917 for ($ptr = 0; $ptr < count($this->OTLdata) - 1; $ptr++) {
918 if (Indic::in_range($this->OTLdata[$ptr]['uni'], 0x0F20, 0x0F33) && $this->OTLdata[$ptr + 1]['uni'] == 0x0F3F) {
919 $tmp = $this->OTLdata[$ptr + 1];
920 $this->OTLdata[$ptr + 1] = $this->OTLdata[$ptr];
921 $this->OTLdata[$ptr] = $tmp;
930 for($ptr=0; $ptr<count($this->OTLdata); $ptr++) {
931 $char = $this->OTLdata[$ptr]['uni'];
946 array_splice($this->OTLdata, $ptr, 1, $newinfo);
991 for ($i = count($this->OTLdata) - 1; $i > 0; $i--) {
993 if (isset($this->OTLdata[$i]['wordend']) && $this->OTLdata[$i]['wordend'] &&
994 isset($this->OTLdata[$i + 1]['uni']) && (!isset($this->OTLdata[$i + 1]['syllable']) || !isset($this->OTLdata[$i + 1]['syllable']) || $this->OTLdata[$i + 1]['syllable'] != $this->OTLdata[$i]['syllable'])) {
995 array_splice($this->OTLdata, $i + 1, 0, $newinfo);
997 } elseif ($this->OTLdata[$i]['uni'] == 0x2e) { // Word end if Full-stop.
998 array_splice($this->OTLdata, $i + 1, 0, $newinfo);
1009 for ($i = 0; $i < count($this->OTLdata); $i++) {
1010 if ($this->OTLdata[$i]['uni'] == 8204 || $this->OTLdata[$i]['uni'] == 8205) {
1011 array_splice($this->OTLdata, $i, 1);
1079 // (sets: $this->OTLdata[n]['GPOSinfo'] XPlacement YPlacement XAdvance Entry Exit )
1087 for ($i = (count($this->OTLdata) - 1); $i >= 0; $i--) {
1090 while (isset($this->OTLdata[$nextbase]['hex']) && strpos($this->GlyphClassMarks, $this->OTLdata[$nextbase]['hex']) !== false) {
1101 if (isset($this->OTLdata[$j]['GPOSinfo']['YPlacement'])) {
1102 $this->OTLdata[$j]['GPOSinfo']['YPlacement'] += $incurs;
1104 $this->OTLdata[$j]['GPOSinfo']['YPlacement'] = $incurs;
1111 if (isset($this->OTLdata[$nextbase + 1]['GPOSinfo']['XAdvance'])) {
1112 $this->OTLdata[$nextbase + 1]['GPOSinfo']['XAdvance'] += $adj;
1114 $this->OTLdata[$nextbase + 1]['GPOSinfo']['XAdvance'] = $adj;
1120 } elseif (strpos($this->GlyphClassMarks, $this->OTLdata[$i]['hex']) !== false) {
1129 for ($i = 0; $i < count($this->OTLdata); $i++) {
1132 while (strpos($this->GlyphClassMarks, $this->OTLdata[$nextbase]['hex']) !== false) {
1143 if (isset($this->OTLdata[$j]['GPOSinfo']['YPlacement'])) {
1144 $this->OTLdata[$j]['GPOSinfo']['YPlacement'] += $incurs;
1146 $this->OTLdata[$j]['GPOSinfo']['YPlacement'] = $incurs;
1153 if (isset($this->OTLdata[$nextbase]['GPOSinfo']['XAdvance'])) {
1154 $this->OTLdata[$nextbase]['GPOSinfo']['XAdvance'] += $adj;
1156 $this->OTLdata[$nextbase]['GPOSinfo']['XAdvance'] = $adj;
1162 } elseif (strpos($this->GlyphClassMarks, $this->OTLdata[$i]['hex']) !== false) {
1177 $this->schOTLdata[$sch] = $this->OTLdata;
1178 $this->OTLdata = [];
1203 $this->OTLdata['GPOSinfo'] = $newGPOSinfo;
1204 $this->OTLdata['char_data'] = $newchar_data;
1205 $this->OTLdata['group'] = $newgroup;
1207 // This leaves OTLdata::GPOSinfo, ::bidi_type, & ::group
1309 while ($ptr < (count($this->OTLdata))) { // whilst there is another glyph ..0064
1310 $currGlyph = $this->OTLdata[$ptr]['hex'];
1311 $currGID = $this->OTLdata[$ptr]['uni'];
1352 while ($ptr < (count($this->OTLdata))) { // whilst there is another glyph ..0064
1353 $currGlyph = $this->OTLdata[$ptr]['hex'];
1354 $currGID = $this->OTLdata[$ptr]['uni'];
1418 while ($ptr < (count($this->OTLdata))) { // whilst there is another glyph ..0064
1419 $currGlyph = $this->OTLdata[$ptr]['hex'];
1420 $currGID = $this->OTLdata[$ptr]['uni'];
1475 while ($ptr < (count($this->OTLdata))) { // whilst there is another glyph ..0064
1476 $currGlyph = $this->OTLdata[$ptr]['hex'];
1477 $currGID = $this->OTLdata[$ptr]['uni'];
1507 if (!($this->OTLdata[$ptr]['mask'] & $mask)) {
1538 if (!($this->OTLdata[$ptr]['mask'] & $mask)) {
1542 $nextGlyph = $this->OTLdata[$ptr + 1]['hex'];
1543 $nextGID = $this->OTLdata[$ptr + 1]['uni'];
1792 //while $this->OTLdata[$spos]['uni'] is an "ignore" => spos++
1793 while (isset($this->OTLdata[$spos]) && strpos($ignore, $this->OTLdata[$spos]['hex']) !== false) {
1797 if (isset($this->OTLdata[$spos]) && $this->OTLdata[$spos]['uni'] == $checkGlyph) {
1855 $Input[0] = $this->OTLdata[$ptr]['uni'];
1881 $lucurrGlyph = $this->OTLdata[$luptr]['hex'];
1882 $lucurrGID = $this->OTLdata[$luptr]['uni'];
1990 $lucurrGlyph = $this->OTLdata[$luptr]['hex'];
1991 $lucurrGID = $this->OTLdata[$luptr]['uni'];
2052 $Input[0] = $this->OTLdata[$ptr]['uni'];
2087 $lucurrGlyph = $this->OTLdata[$luptr]['hex'];
2088 $lucurrGID = $this->OTLdata[$luptr]['uni'];
2257 $lucurrGlyph = $this->OTLdata[$luptr]['hex'];
2258 $lucurrGID = $this->OTLdata[$luptr]['uni'];
2342 $lucurrGlyph = $this->OTLdata[$luptr]['hex'];
2343 $lucurrGID = $this->OTLdata[$luptr]['uni'];
2375 for ($p = count($this->OTLdata) - 1; $p >= ($pos + $n); $p--) {
2382 for ($p = count($this->OTLdata) - 1; $p >= 0; $p--) {
2397 for ($p = ($pos + 1); $p < count($this->OTLdata); $p++) {
2404 for ($p = 0; $p < count($this->OTLdata); $p++) {
2425 $this->OTLdata[$pos]['uni'] = $substitute;
2426 $this->OTLdata[$pos]['hex'] = $this->unicode_hex($substitute);
2440 $bt = $this->OTLdata[$pos]['bidi_type'];
2457 $newOTLdata[$i]['general_category'] = $this->OTLdata[$pos]['general_category'];
2460 $newOTLdata[$i]['indic_category'] = $this->OTLdata[$pos]['indic_category'];
2461 $newOTLdata[$i]['indic_position'] = $this->OTLdata[$pos]['indic_position'];
2463 $newOTLdata[$i]['myanmar_category'] = $this->OTLdata[$pos]['myanmar_category'];
2464 $newOTLdata[$i]['myanmar_position'] = $this->OTLdata[$pos]['myanmar_position'];
2466 if (isset($this->OTLdata[$pos]['mask'])) {
2467 $newOTLdata[$i]['mask'] = $this->OTLdata[$pos]['mask'];
2469 if (isset($this->OTLdata[$pos]['syllable'])) {
2470 $newOTLdata[$i]['syllable'] = $this->OTLdata[$pos]['syllable'];
2474 if ($this->OTLdata[$pos]['wordend']) {
2479 array_splice($this->OTLdata, $pos, 1, $newOTLdata); // Replace 1 with n
2488 $firstGlyph = $this->OTLdata[$pos]['hex'];
2493 if (isset($this->OTLdata[$pos]['syllable'])) {
2494 $current_syllable = $this->OTLdata[$pos]['syllable'];
2500 $unistr = $this->OTLdata[$GlyphPos[$i]]['hex'];
2501 if ($this->restrictToSyllable && isset($this->OTLdata[$GlyphPos[$i]]['syllable']) && $this->OTLdata[$GlyphPos[$i]]['syllable'] != $current_syllable) {
2519 // $unistr = $this->OTLdata[$GlyphPos[$i]]['hex'];
2598 while ((($i == count($GlyphPos) - 1) || (isset($GlyphPos[$i + 1]) && ($GlyphPos[$i] + $ic) < $GlyphPos[$i + 1])) && isset($this->OTLdata[($GlyphPos[$i] + $ic)]) && strpos($this->GlyphClassMarks, $this->OTLdata[($GlyphPos[$i] + $ic)]['hex']) !== false) {
2620 $bt = $this->OTLdata[$pos]['bidi_type'];
2632 $newOTLdata[0]['general_category'] = $this->OTLdata[$pos]['general_category'];
2641 if (isset($this->OTLdata[$GlyphPos[(count($GlyphPos) - 1)]]['GPOSinfo']['kashida'])) {
2642 $ka = $this->OTLdata[$GlyphPos[(count($GlyphPos) - 1)]]['GPOSinfo']['kashida'];
2644 if ($ka == 1 && isset($this->OTLdata[$pos]['form']) && $this->OTLdata[$pos]['form'] == 3) {
2652 $newOTLdata[0]['indic_category'] = $this->OTLdata[$pos]['indic_category'];
2653 $newOTLdata[0]['indic_position'] = $this->OTLdata[$pos]['indic_position'];
2655 $newOTLdata[0]['myanmar_category'] = $this->OTLdata[$pos]['myanmar_category'];
2656 $newOTLdata[0]['myanmar_position'] = $this->OTLdata[$pos]['myanmar_position'];
2658 if (isset($this->OTLdata[$pos]['mask'])) {
2659 $newOTLdata[0]['mask'] = $this->OTLdata[$pos]['mask'];
2661 if (isset($this->OTLdata[$pos]['syllable'])) {
2662 $newOTLdata[0]['syllable'] = $this->OTLdata[$pos]['syllable'];
2668 array_splice($this->OTLdata, $pos, 1, $newOTLdata);
2674 array_splice($this->OTLdata, $gpos, 1);
2683 for ($p = ($GlyphPos[0] + 1); $p < (count($this->OTLdata) + count($GlyphPos) - 1); $p++) {
2841 for ($i = 0; $i < count($this->OTLdata); $i++) {
2842 $chars[] = $this->OTLdata[$i]['hex'];
2892 for ($i = 0; $i < count($this->OTLdata); $i++) {
2893 $this->OTLdata[$i]['uni'] = hexdec($ra[$i][0]);
2894 $this->OTLdata[$i]['hex'] = $ra[$i][0];
2895 $this->OTLdata[$i]['form'] = $ra[$i][1]; // Actaul form substituted 0=ISOLATED FORM :: 1=FINAL :: 2=INITIAL :: 3=MEDIAL
2996 // Sets $this->OTLdata[$i]['wordend']=true at possible end of word boundaries
2999 for ($ptr = 0; $ptr < count($this->OTLdata); $ptr++) {
3001 if (isset($this->OTLdata[$ptr]['uni']) && ($this->OTLdata[$ptr]['uni'] == 0x0F0B || $this->OTLdata[$ptr]['uni'] == 0x0F0D)) {
3002 if (isset($this->OTLdata[$ptr + 1]['uni']) && ($this->OTLdata[$ptr + 1]['uni'] == 0x0F0D || $this->OTLdata[$ptr + 1]['uni'] == 0xF0E)) {
3005 // Set end of word marker in OTLdata at matchpos
3006 $this->OTLdata[$ptr]['wordend'] = true;
3014 * Sets $this->OTLdata[$i]['wordend']=true at possible end of word boundaries
3025 // Find all word boundaries and mark end of word $this->OTLdata[$i]['wordend']=true on last character
3035 while ($ptr < count($this->OTLdata) - 3) {
3045 if (isset($this->OTLdata[$matchpos + 1]['uni']) && ($this->OTLdata[$matchpos + 1]['uni'] == 0x0E2F || $this->OTLdata[$matchpos + 1]['uni'] == 0x0E46 || $this->OTLdata[$matchpos + 1]['uni'] == 0x0EC6)) {
3048 // Set end of word marker in OTLdata at matchpos
3049 $this->OTLdata[$matchpos]['wordend'] = true;
3054 while (isset($this->OTLdata[$ptr]['uni']) && ($this->OTLdata[$ptr]['uni'] >> 8) == 0) {
3064 // Set end of word marker in OTLdata at matchpos
3065 $this->OTLdata[$firstmatch]['wordend'] = true;
3073 // Set end of word marker in OTLdata at end of longest first match
3074 $this->OTLdata[$matches[count($matches) - 1]]['wordend'] = true;
3077 while (isset($this->OTLdata[$ptr]['uni']) && ($this->OTLdata[$ptr]['uni'] >> 8) == 0) {
3105 $c = $this->OTLdata[$ptr]['uni'] & 0xFF;
3109 if (isset($this->OTLdata[$ptr]['uni']) && strpos($this->GlyphClassMarks, $this->OTLdata[$ptr]['hex']) === false) {
3116 if (isset($this->OTLdata[$ptr]['uni']) && strpos($this->GlyphClassMarks, $this->OTLdata[$ptr]['hex']) === false) {
3126 if ($ptr > count($this->OTLdata) - 1) {
3130 if (isset($this->OTLdata[$ptr]['uni']) && strpos($this->GlyphClassMarks, $this->OTLdata[$ptr]['hex']) === false) {
3177 while ($ptr < (count($this->OTLdata))) { // whilst there is another glyph ..0064
3178 $currGlyph = $this->OTLdata[$ptr]['hex'];
3179 $currGID = $this->OTLdata[$ptr]['uni'];
3185 if (isset($this->OTLdata[$ptr]['bidi_type'])) { // No need to check bidi_type - just a check that it exists
3218 if (strpos($this->GlyphClassMarks, $this->OTLdata[$basepos]['hex']) !== false) {
3219 $cw = round($this->mpdf->_getCharWidth($this->mpdf->CurrentFont['cw'], $this->OTLdata[$basepos]['uni']) * $this->mpdf->CurrentFont['unitsPerEm'] / 1000); // convert back to font design units
3235 if (isset($this->OTLdata[$apos]['GPOSinfo']['XAdvanceL'])) {
3236 $this->OTLdata[$apos]['GPOSinfo']['XAdvanceL'] += $Value['XAdvance'] - $cw;
3238 $this->OTLdata[$apos]['GPOSinfo']['XAdvanceL'] = $Value['XAdvance'] - $cw;
3240 if (isset($this->OTLdata[$basepos]['GPOSinfo']['XAdvanceR'])) {
3241 $this->OTLdata[$basepos]['GPOSinfo']['XAdvanceR'] += $Value['XAdvance'] - $cw;
3243 $this->OTLdata[$basepos]['GPOSinfo']['XAdvanceR'] = $Value['XAdvance'] - $cw;
3250 if (isset($this->OTLdata[$a]['GPOSinfo']['XPlacement'])) {
3251 $this->OTLdata[$a]['GPOSinfo']['XPlacement'] += $Value['XPlacement'];
3253 $this->OTLdata[$a]['GPOSinfo']['XPlacement'] = $Value['XPlacement'];
3257 if (isset($this->OTLdata[$a]['GPOSinfo']['YPlacement'])) {
3258 $this->OTLdata[$a]['GPOSinfo']['YPlacement'] += $Value['YPlacement'];
3260 $this->OTLdata[$a]['GPOSinfo']['YPlacement'] = $Value['YPlacement'];
3272 if (strpos($this->GlyphClassMarks, $this->OTLdata[$pos]['hex']) !== false) {
3276 while (isset($this->OTLdata[$pos + 1]['hex']) && strpos($this->GlyphClassMarks, $this->OTLdata[$pos + 1]['hex']) !== false) {
3349 $FirstGlyph = $this->OTLdata[$ptr]['uni'];
3353 while (isset($this->OTLdata[$checkpos]) && strpos($ignore, $this->OTLdata[$checkpos]['hex']) !== false) {
3356 if (isset($this->OTLdata[$checkpos]) && $this->OTLdata[$checkpos]['uni'] == $SecondGlyph) {
3402 $FirstGlyph = $this->OTLdata[$ptr]['uni'];
3405 while (isset($this->OTLdata[$checkpos]) && strpos($ignore, $this->OTLdata[$checkpos]['hex']) !== false) {
3408 if (isset($this->OTLdata[$checkpos])) {
3414 $SecondGlyph = $this->OTLdata[$matchedpos]['uni'];
3520 if ($this->shaper == 'I' && $is_old_spec && strpos($this->GlyphClassMarks, $this->OTLdata[$ptr]['hex']) === false) {
3526 while (isset($this->OTLdata[$checkpos]) && strpos($this->GlyphClassMarks, $this->OTLdata[$checkpos]['hex']) !== false) {
3530 if (isset($this->OTLdata[$checkpos]) && strpos($BaseGlyphs, $this->OTLdata[$checkpos]['hex']) !== false) {
3544 $BasePos = strpos($BaseGlyphs, $this->OTLdata[$matchedpos]['hex']) / 6;
3557 $BaseWidth = $this->mpdf->_getCharWidth($this->mpdf->CurrentFont['cw'], $this->OTLdata[$matchedpos]['uni']) * $this->mpdf->CurrentFont['unitsPerEm'] / 1000; // convert back to font design units
3558 $this->OTLdata[$ptr]['GPOSinfo']['BaseWidth'] = $BaseWidth;
3562 $BaseWidthExtra = $this->mpdf->_getCharWidth($this->mpdf->CurrentFont['cw'], $this->OTLdata[$i]['uni']) * $this->mpdf->CurrentFont['unitsPerEm'] / 1000; // convert back to font design units
3563 $this->OTLdata[$ptr]['GPOSinfo']['BaseWidth'] += $BaseWidthExtra;
3568 $prevXPlacement = (isset($this->OTLdata[$matchedpos]['GPOSinfo']['XPlacement']) ? $this->OTLdata[$matchedpos]['GPOSinfo']['XPlacement'] : 0);
3569 $prevYPlacement = (isset($this->OTLdata[$matchedpos]['GPOSinfo']['YPlacement']) ? $this->OTLdata[$matchedpos]['GPOSinfo']['YPlacement'] : 0);
3571 $this->OTLdata[$ptr]['GPOSinfo']['XPlacement'] = $prevXPlacement + $BaseRecord['AnchorX'] - $MarkRecord['AnchorX'];
3572 $this->OTLdata[$ptr]['GPOSinfo']['YPlacement'] = $prevYPlacement + $BaseRecord['AnchorY'] - $MarkRecord['AnchorY'];
3598 while (isset($this->OTLdata[$checkpos]) && strpos($this->GlyphClassMarks, $this->OTLdata[$checkpos]['hex']) !== false) {
3602 if (isset($this->OTLdata[$checkpos]) && strpos($LigatureGlyphs, $this->OTLdata[$checkpos]['hex']) !== false) {
3616 $LigaturePos = strpos($LigatureGlyphs, $this->OTLdata[$matchedpos]['hex']) / 6;
3646 $LigatureWidth = $this->mpdf->_getCharWidth($this->mpdf->CurrentFont['cw'], $this->OTLdata[$matchedpos]['uni']) * $this->mpdf->CurrentFont['unitsPerEm'] / 1000; // convert back to font design units
3647 $this->OTLdata[$ptr]['GPOSinfo']['BaseWidth'] = $LigatureWidth;
3651 $LigatureWidthExtra = $this->mpdf->_getCharWidth($this->mpdf->CurrentFont['cw'], $this->OTLdata[$i]['uni']) * $this->mpdf->CurrentFont['unitsPerEm'] / 1000; // convert back to font design units
3652 $this->OTLdata[$ptr]['GPOSinfo']['BaseWidth'] += $LigatureWidthExtra;
3657 if (isset($this->OTLdata[$matchedpos]['GPOSinfo']['XPlacement'])) {
3658 $prevXPlacement = $this->OTLdata[$matchedpos]['GPOSinfo']['XPlacement'];
3662 if (isset($this->OTLdata[$matchedpos]['GPOSinfo']['YPlacement'])) {
3663 $prevYPlacement = $this->OTLdata[$matchedpos]['GPOSinfo']['YPlacement'];
3668 $this->OTLdata[$ptr]['GPOSinfo']['XPlacement'] = $prevXPlacement + $LigatureRecord['AnchorX'] - $MarkRecord['AnchorX'];
3669 $this->OTLdata[$ptr]['GPOSinfo']['YPlacement'] = $prevYPlacement + $LigatureRecord['AnchorY'] - $MarkRecord['AnchorY'];
3691 while (isset($this->OTLdata[$checkpos]) && strpos($ignore, $this->OTLdata[$checkpos]['hex']) !== false) {
3694 if (isset($this->OTLdata[$checkpos]) && strpos($Mark2Glyphs, $this->OTLdata[$checkpos]['hex']) !== false) {
3708 $Mark2Pos = strpos($Mark2Glyphs, $this->OTLdata[$matchedpos]['hex']) / 6;
3721 $Mark2Width = $this->mpdf->_getCharWidth($this->mpdf->CurrentFont['cw'], $this->OTLdata[$matchedpos]['uni']) * $this->mpdf->CurrentFont['unitsPerEm'] / 1000; // convert back to font design units
3755 if (!isset($this->OTLdata[$matchedpos]['GPOSinfo']['BaseWidth']) || !$this->OTLdata[$matchedpos]['GPOSinfo']['BaseWidth']) {
3756 $this->OTLdata[$ptr]['GPOSinfo']['BaseWidth'] = $Mark2Width;
3761 if (isset($this->OTLdata[$matchedpos]['GPOSinfo']['BaseWidth']) && $this->OTLdata[$matchedpos]['GPOSinfo']['BaseWidth']) {
3762 $this->OTLdata[$ptr]['GPOSinfo']['BaseWidth'] = $this->OTLdata[$matchedpos]['GPOSinfo']['BaseWidth'];
3766 $prevXPlacement = (isset($this->OTLdata[$matchedpos]['GPOSinfo']['XPlacement']) ? $this->OTLdata[$matchedpos]['GPOSinfo']['XPlacement'] : 0);
3767 $prevYPlacement = (isset($this->OTLdata[$matchedpos]['GPOSinfo']['YPlacement']) ? $this->OTLdata[$matchedpos]['GPOSinfo']['YPlacement'] : 0);
3768 $this->OTLdata[$ptr]['GPOSinfo']['XPlacement'] = $prevXPlacement + $Mark2Record['AnchorX'] - $Mark1Record['AnchorX'];
3769 $this->OTLdata[$ptr]['GPOSinfo']['YPlacement'] = $prevYPlacement + $Mark2Record['AnchorY'] - $Mark1Record['AnchorY'];
3869 $lucurrGlyph = $this->OTLdata[$luptr]['hex'];
3870 $lucurrGID = $this->OTLdata[$luptr]['uni'];
4054 $lucurrGlyph = $this->OTLdata[$luptr]['hex'];
4055 $lucurrGID = $this->OTLdata[$luptr]['uni'];
4140 $lucurrGlyph = $this->OTLdata[$luptr]['hex'];
4141 $lucurrGID = $this->OTLdata[$luptr]['uni'];
4171 $current_syllable = (isset($this->OTLdata[$ptr]['syllable']) ? $this->OTLdata[$ptr]['syllable'] : 0);
4177 while (isset($this->OTLdata[$checkpos]) && strpos($ignore, $this->OTLdata[$checkpos]['hex']) !== false) {
4181 if ($this->restrictToSyllable && isset($this->OTLdata[$checkpos]['syllable']) && $this->OTLdata[$checkpos]['syllable'] != $current_syllable) {
4183 } elseif (!isset($this->OTLdata[$checkpos]) || $this->OTLdata[$checkpos]['uni'] != $Backtrack[$i]) {
4193 while (isset($this->OTLdata[$checkpos]) && strpos($ignore, $this->OTLdata[$checkpos]['hex']) !== false) {
4197 if ($this->restrictToSyllable && isset($this->OTLdata[$checkpos]['syllable']) && $this->OTLdata[$checkpos]['syllable'] != $current_syllable) {
4199 } elseif (isset($this->OTLdata[$checkpos]) && $this->OTLdata[$checkpos]['uni'] == $Input[$i]) {
4209 while (isset($this->OTLdata[$checkpos]) && strpos($ignore, $this->OTLdata[$checkpos]['hex']) !== false) {
4213 if ($this->restrictToSyllable && isset($this->OTLdata[$checkpos]['syllable']) && $this->OTLdata[$checkpos]['syllable'] != $current_syllable) {
4215 } elseif (!isset($this->OTLdata[$checkpos]) || $this->OTLdata[$checkpos]['uni'] != $Lookahead[$i]) {
4231 $current_syllable = (isset($this->OTLdata[$ptr]['syllable']) ? $this->OTLdata[$ptr]['syllable'] : 0);
4237 while (isset($this->OTLdata[$checkpos]) && strpos($ignore, $this->OTLdata[$checkpos]['hex']) !== false) {
4241 if ($this->restrictToSyllable && isset($this->OTLdata[$checkpos]['syllable']) && $this->OTLdata[$checkpos]['syllable'] != $current_syllable) {
4244 elseif (!$Backtrack[$i] && isset($this->OTLdata[$checkpos]) && strpos($bclass0excl, $this->OTLdata[$checkpos]['hex']) !== false) {
4246 } elseif (!isset($this->OTLdata[$checkpos]) || strpos($Backtrack[$i], $this->OTLdata[$checkpos]['hex']) === false) {
4256 while (isset($this->OTLdata[$checkpos]) && strpos($ignore, $this->OTLdata[$checkpos]['hex']) !== false) {
4260 if ($this->restrictToSyllable && isset($this->OTLdata[$checkpos]['syllable']) && $this->OTLdata[$checkpos]['syllable'] != $current_syllable) {
4263 elseif (!$Input[$i] && isset($this->OTLdata[$checkpos]) && strpos($class0excl, $this->OTLdata[$checkpos]['hex']) === false) {
4265 } elseif (isset($this->OTLdata[$checkpos]) && strpos($Input[$i], $this->OTLdata[$checkpos]['hex']) !== false) {
4275 while (isset($this->OTLdata[$checkpos]) && strpos($ignore, $this->OTLdata[$checkpos]['hex']) !== false) {
4279 if ($this->restrictToSyllable && isset($this->OTLdata[$checkpos]['syllable']) && $this->OTLdata[$checkpos]['syllable'] != $current_syllable) {
4282 elseif (!$Lookahead[$i] && isset($this->OTLdata[$checkpos]) && strpos($lclass0excl, $this->OTLdata[$checkpos]['hex']) !== false) {
4284 } elseif (!isset($this->OTLdata[$checkpos]) || strpos($Lookahead[$i], $this->OTLdata[$checkpos]['hex']) === false) {
4299 $current_syllable = (isset($this->OTLdata[$ptr]['syllable']) ? $this->OTLdata[$ptr]['syllable'] : 0);
4305 while (isset($this->OTLdata[$checkpos]) && strpos($ignore, $this->OTLdata[$checkpos]['hex']) !== false) {
4309 if ($this->restrictToSyllable && isset($this->OTLdata[$checkpos]['syllable']) && $this->OTLdata[$checkpos]['syllable'] != $current_syllable) {
4312 elseif (!$Backtrack[$i] && isset($this->OTLdata[$checkpos]) && isset($bclass0excl[$this->OTLdata[$checkpos]['uni']])) {
4314 } elseif (!isset($this->OTLdata[$checkpos]) || !isset($Backtrack[$i][$this->OTLdata[$checkpos]['uni']])) {
4324 while (isset($this->OTLdata[$checkpos]) && strpos($ignore, $this->OTLdata[$checkpos]['hex']) !== false) {
4328 if ($this->restrictToSyllable && isset($this->OTLdata[$checkpos]['syllable']) && $this->OTLdata[$checkpos]['syllable'] != $current_syllable) {
4331 elseif (!$Input[$i] && isset($this->OTLdata[$checkpos]) && !isset($class0excl[$this->OTLdata[$checkpos]['uni']])) {
4333 } elseif (isset($this->OTLdata[$checkpos]) && isset($Input[$i][$this->OTLdata[$checkpos]['uni']])) {
4343 while (isset($this->OTLdata[$checkpos]) && strpos($ignore, $this->OTLdata[$checkpos]['hex']) !== false) {
4347 if ($this->restrictToSyllable && isset($this->OTLdata[$checkpos]['syllable']) && $this->OTLdata[$checkpos]['syllable'] != $current_syllable) {
4350 elseif (!$Lookahead[$i] && isset($this->OTLdata[$checkpos]) && isset($lclass0excl[$this->OTLdata[$checkpos]['uni']])) {
4352 } elseif (!isset($this->OTLdata[$checkpos]) || !isset($Lookahead[$i][$this->OTLdata[$checkpos]['uni']])) {
4981 * Firstly set the level in the OTLdata - called from fn printbuffer() [_bidiPrepare]
5725 public function sliceOTLdata($OTLdata, $pos, $len)
5728 $newOTLdata['group'] = substr($OTLdata['group'], $pos, $len);
5730 if ($OTLdata['GPOSinfo']) {
5731 foreach ($OTLdata['GPOSinfo'] as $k => $val) {
5738 if (isset($OTLdata['char_data'])) {
5739 $newOTLdata['char_data'] = array_slice($OTLdata['char_data'], $pos, $len);
5751 * Remove one or more occurrences of $char (single character) from $txt and adjust OTLdata
5778 * Remove one or more occurrences of $char (single character) from $txt and adjust OTLdata
6187 for ($i = 0; $i < count($this->OTLdata); $i++) {
6191 echo $this->OTLdata[$i]['hex'] . ' ';
6198 for ($i = 0; $i < count($this->OTLdata); $i++) {
6202 echo str_pad($this->OTLdata[$i]['uni'], 5) . ' ';
6210 for ($i = 0; $i < count($this->OTLdata); $i++) {
6211 if (!empty($this->OTLdata[$i]['GPOSinfo'])) {
6212 echo $this->OTLdata[$i]['hex'] . ' &#x' . $this->OTLdata[$i]['hex'] . '; ';
6213 print_r($this->OTLdata[$i]['GPOSinfo']);