Lines Matching defs:ptr

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);
567 $ptr += count($sub) - 1;
571 if ($char == 0x09AF && isset($this->OTLdata[$ptr + 1]) && $this->OTLdata[$ptr + 1]['uni'] == 0x09BC) {
581 array_splice($this->OTLdata, $ptr, 2, $newinfo);
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);
901 $ptr++;
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);
947 $ptr += count($sub)-1;
1307 $ptr = 0;
1309 while ($ptr < (count($this->OTLdata))) { // whilst there is another glyph ..0064
1310 $currGlyph = $this->OTLdata[$ptr]['hex'];
1311 $currGID = $this->OTLdata[$ptr]['uni'];
1317 $shift = $this->_applyGSUBsubtable($lu, $c, $ptr, $currGlyph, $currGID, ($subtable_offset - $this->GSUB_offset), $Type, $Flag, $MarkFilteringSet, $this->GSLuCoverage[$lu][$c], 0, $tag, 0, $tagInt);
1327 $ptr += $shift;
1350 $ptr = 0;
1352 while ($ptr < (count($this->OTLdata))) { // whilst there is another glyph ..0064
1353 $currGlyph = $this->OTLdata[$ptr]['hex'];
1354 $currGID = $this->OTLdata[$ptr]['uni'];
1370 $shift = $this->_applyGSUBsubtable($lu, $c, $ptr, $currGlyph, $currGID, ($subtable_offset - $this->GSUB_offset), $Type, $Flag, $MarkFilteringSet, $this->GSLuCoverage[$lu][$c], 0, $tag, 0, $tagInt);
1381 $ptr += $shift;
1416 $ptr = 0;
1418 while ($ptr < (count($this->OTLdata))) { // whilst there is another glyph ..0064
1419 $currGlyph = $this->OTLdata[$ptr]['hex'];
1420 $currGID = $this->OTLdata[$ptr]['uni'];
1426 $shift = $this->_applyGSUBsubtable($lu, $c, $ptr, $currGlyph, $currGID, ($subtable_offset - $this->GSUB_offset), $Type, $Flag, $MarkFilteringSet, $this->GSLuCoverage[$lu][$c], 0, $usetag, 0, $tagInt);
1436 $ptr += $shift;
1473 $ptr = 0;
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)) {
1512 $shift = $this->_applyGSUBsubtable($lu, $c, $ptr, $currGlyph, $currGID, ($subtable_offset - $this->GSUB_offset), $Type, $Flag, $MarkFilteringSet, $this->GSLuCoverage[$lu][$c], 0, $usetag, $is_old_spec, $tagInt);
1538 if (!($this->OTLdata[$ptr]['mask'] & $mask)) {
1542 $nextGlyph = $this->OTLdata[$ptr + 1]['hex'];
1543 $nextGID = $this->OTLdata[$ptr + 1]['uni'];
1546 $shift = $this->_applyGSUBsubtableSpecial($lu, $c, $ptr, $currGlyph, $currGID, $nextGlyph, $nextGID, ($subtable_offset - $this->GSUB_offset), $Type, $this->GSLuCoverage[$lu][$c]);
1558 $ptr += $shift;
1564 function _applyGSUBsubtableSpecial($lookupID, $subtable, $ptr, $currGlyph, $currGID, $nextGlyph, $nextGID, $subtable_offset, $Type, $LuCoverage)
1619 $GlyphPos[] = $ptr;
1620 $GlyphPos[] = $ptr + 1;
1624 $shift = $this->GSUBsubstitute($ptr, $substitute, 4, $GlyphPos); // GlyphPos contains positions to set null
1633 function _applyGSUBsubtable($lookupID, $subtable, $ptr, $currGlyph, $currGID, $subtable_offset, $Type, $Flag, $MarkFilteringSet, $LuCoverage, $level, $currentTag, $is_old_spec, $tagInt)
1669 $shift = $this->GSUBsubstitute($ptr, $substitute, $Type);
1671 $this->_dumpproc('GSUB', $lookupID, $subtable, $Type, $SubstFormat, $ptr, $currGlyph, $level);
1699 $shift = $this->GSUBsubstitute($ptr, $SubstituteGlyphs, $Type);
1701 $this->_dumpproc('GSUB', $lookupID, $subtable, $Type, $SubstFormat, $ptr, $currGlyph, $level);
1745 $shift = $this->GSUBsubstitute($ptr, $substitute, $Type);
1747 $this->_dumpproc('GSUB', $lookupID, $subtable, $Type, $SubstFormat, $ptr, $currGlyph, $level);
1783 $spos = $ptr;
1807 $shift = $this->GSUBsubstitute($ptr, $substitute, $Type, $GlyphPos); // GlyphPos contains positions to set null
1809 $this->_dumpproc('GSUB', $lookupID, $subtable, $Type, $SubstFormat, $ptr, $currGlyph, $level);
1812 return ($spos - $ptr + 1 - ($CompCount - 1));
1855 $Input[0] = $this->OTLdata[$ptr]['uni'];
1860 $matched = $this->checkContextMatch($Input, $Backtrack, $Lookahead, $ignore, $ptr);
1863 $this->_dumpproc('GSUB', $lookupID, $subtable, $Type, $SubstFormat, $ptr, $currGlyph, $level);
1969 $matched = $this->checkContextMatchMultipleUni($inputGlyphs, $backtrackGlyphs, $lookaheadGlyphs, $ignore, $ptr, $class0excl);
1972 $this->_dumpproc('GSUB', $lookupID, $subtable, $Type, $SubstFormat, $ptr, $currGlyph, $level);
2052 $Input[0] = $this->OTLdata[$ptr]['uni'];
2065 $matched = $this->checkContextMatch($Input, $Backtrack, $Lookahead, $ignore, $ptr);
2068 $this->_dumpproc('GSUB', $lookupID, $subtable, $Type, $SubstFormat, $ptr, $currGlyph, $level);
2235 $matched = $this->checkContextMatchMultipleUni($inputGlyphs, $backtrackGlyphs, $lookaheadGlyphs, $ignore, $ptr, $class0excl, $bclass0excl, $lclass0excl);
2238 $this->_dumpproc('GSUB', $lookupID, $subtable, $Type, $SubstFormat, $ptr, $currGlyph, $level);
2319 $matched = $this->checkContextMatchMultiple($CoverageInputGlyphs, $CoverageBacktrackGlyphs, $CoverageLookaheadGlyphs, $ignore, $ptr);
2322 $this->_dumpproc('GSUB', $lookupID, $subtable, $Type, $SubstFormat, $ptr, $currGlyph, $level);
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)) {
3006 $this->OTLdata[$ptr]['wordend'] = true;
3033 $ptr = 0;
3035 while ($ptr < count($this->OTLdata) - 3) {
3040 $matches = $this->checkwordmatch($dict, $ptr);
3050 $ptr = $matchpos + 1;
3052 $ptr++;
3054 while (isset($this->OTLdata[$ptr]['uni']) && ($this->OTLdata[$ptr]['uni'] >> 8) == 0) {
3055 $ptr++;
3066 $ptr = $firstmatch + 1;
3075 $ptr = $matches[count($matches) - 1] + 1;
3077 while (isset($this->OTLdata[$ptr]['uni']) && ($this->OTLdata[$ptr]['uni'] >> 8) == 0) {
3078 $ptr++;
3085 private function checkwordmatch(&$dict, $ptr)
3105 $c = $this->OTLdata[$ptr]['uni'] & 0xFF;
3109 if (isset($this->OTLdata[$ptr]['uni']) && strpos($this->GlyphClassMarks, $this->OTLdata[$ptr]['hex']) === false) {
3110 $matches[] = $ptr - 1;
3116 if (isset($this->OTLdata[$ptr]['uni']) && strpos($this->GlyphClassMarks, $this->OTLdata[$ptr]['hex']) === false) {
3117 $matches[] = $ptr - 1;
3125 $ptr++;
3126 if ($ptr > count($this->OTLdata) - 1) {
3130 if (isset($this->OTLdata[$ptr]['uni']) && strpos($this->GlyphClassMarks, $this->OTLdata[$ptr]['hex']) === false) {
3131 $matches[] = $ptr - 1;
3175 $ptr = 0;
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
3186 $shift = $this->_applyGPOSsubtable($lu, $c, $ptr, $currGlyph, $currGID, ($subtable_offset - $this->GPOS_offset + $this->GSUB_length), $Type, $Flag, $MarkFilteringSet, $this->LuCoverage[$lu][$c], $tag, 0, $is_old_spec);
3196 $ptr += $shift;
3266 // If XAdvance is aplied to $ptr - in order for PDF to position the Advance correctly need to place it on
3282 private function _applyGPOSsubtable($lookupID, $subtable, $ptr, $currGlyph, $currGID, $subtable_offset, $Type, $Flag, $MarkFilteringSet, $LuCoverage, $tag, $level, $is_old_spec)
3318 $this->_applyGPOSvaluerecord($ptr, $Value);
3320 $this->_dumpproc('GPOS', $lookupID, $subtable, $Type, $PosFormat, $ptr, $currGlyph, $level);
3349 $FirstGlyph = $this->OTLdata[$ptr]['uni'];
3351 $checkpos = $ptr;
3366 $this->_applyGPOSvaluerecord($ptr, $Value1);
3371 $this->_dumpproc('GPOS', $lookupID, $subtable, $Type, $PosFormat, $ptr, $currGlyph, $level);
3373 return $matchedpos - $ptr + 1;
3376 $this->_dumpproc('GPOS', $lookupID, $subtable, $Type, $PosFormat, $ptr, $currGlyph, $level);
3378 return $matchedpos - $ptr;
3402 $FirstGlyph = $this->OTLdata[$ptr]['uni'];
3403 $checkpos = $ptr;
3435 $this->_applyGPOSvaluerecord($ptr, $Value1);
3440 $this->_dumpproc('GPOS', $lookupID, $subtable, $Type, $PosFormat, $ptr, $currGlyph, $level);
3442 return $matchedpos - $ptr + 1;
3445 $this->_dumpproc('GPOS', $lookupID, $subtable, $Type, $PosFormat, $ptr, $currGlyph, $level);
3447 return $matchedpos - $ptr;
3478 $this->Entry[$ptr] = ['X' => $x, 'Y' => $y, 'dir' => $dir];
3490 $this->Exit[$ptr] = ['X' => $x, 'Y' => $y, 'dir' => $dir];
3493 $this->_dumpproc('GPOS', $lookupID, $subtable, $Type, $PosFormat, $ptr, $currGlyph, $level);
3510 $checkpos = $ptr;
3520 if ($this->shaper == 'I' && $is_old_spec && strpos($this->GlyphClassMarks, $this->OTLdata[$ptr]['hex']) === false) {
3558 $this->OTLdata[$ptr]['GPOSinfo']['BaseWidth'] = $BaseWidth;
3560 if (($ptr - $matchedpos) > 1) {
3561 for ($i = $matchedpos + 1; $i < $ptr; $i++) {
3563 $this->OTLdata[$ptr]['GPOSinfo']['BaseWidth'] += $BaseWidthExtra;
3571 $this->OTLdata[$ptr]['GPOSinfo']['XPlacement'] = $prevXPlacement + $BaseRecord['AnchorX'] - $MarkRecord['AnchorX'];
3572 $this->OTLdata[$ptr]['GPOSinfo']['YPlacement'] = $prevYPlacement + $BaseRecord['AnchorY'] - $MarkRecord['AnchorY'];
3574 $this->_dumpproc('GPOS', $lookupID, $subtable, $Type, $PosFormat, $ptr, $currGlyph, $level);
3594 $checkpos = $ptr;
3633 if (isset($this->assocLigs[$matchedpos]) && isset($this->assocMarks[$ptr]['ligPos']) && $this->assocMarks[$ptr]['ligPos'] == $matchedpos) {
3634 $component = $this->assocMarks[$ptr]['compID'];
3647 $this->OTLdata[$ptr]['GPOSinfo']['BaseWidth'] = $LigatureWidth;
3649 if (($ptr - $matchedpos) > 1) {
3650 for ($i = $matchedpos + 1; $i < $ptr; $i++) {
3652 $this->OTLdata[$ptr]['GPOSinfo']['BaseWidth'] += $LigatureWidthExtra;
3668 $this->OTLdata[$ptr]['GPOSinfo']['XPlacement'] = $prevXPlacement + $LigatureRecord['AnchorX'] - $MarkRecord['AnchorX'];
3669 $this->OTLdata[$ptr]['GPOSinfo']['YPlacement'] = $prevYPlacement + $LigatureRecord['AnchorY'] - $MarkRecord['AnchorY'];
3671 $this->_dumpproc('GPOS', $lookupID, $subtable, $Type, $PosFormat, $ptr, $currGlyph, $level);
3689 $checkpos = $ptr;
3733 if (isset($this->assocMarks[$ptr])) {
3734 $thisLig = $this->assocMarks[$ptr]['ligPos'];
3735 $thisComp = $this->assocMarks[$ptr]['compID'];
3756 $this->OTLdata[$ptr]['GPOSinfo']['BaseWidth'] = $Mark2Width;
3762 $this->OTLdata[$ptr]['GPOSinfo']['BaseWidth'] = $this->OTLdata[$matchedpos]['GPOSinfo']['BaseWidth'];
3768 $this->OTLdata[$ptr]['GPOSinfo']['XPlacement'] = $prevXPlacement + $Mark2Record['AnchorX'] - $Mark1Record['AnchorX'];
3769 $this->OTLdata[$ptr]['GPOSinfo']['YPlacement'] = $prevYPlacement + $Mark2Record['AnchorY'] - $Mark1Record['AnchorY'];
3771 $this->_dumpproc('GPOS', $lookupID, $subtable, $Type, $PosFormat, $ptr, $currGlyph, $level);
3851 $matched = $this->checkContextMatchMultipleUni($inputGlyphs, $backtrackGlyphs, $lookaheadGlyphs, $ignore, $ptr, $class0excl);
3875 $this->_dumpproc('GPOS', $lookupID, $subtable, $Type, $PosFormat, $ptr, $currGlyph, $level);
4033 $matched = $this->checkContextMatchMultipleUni($inputGlyphs, $backtrackGlyphs, $lookaheadGlyphs, $ignore, $ptr, $class0excl, $bclass0excl, $lclass0excl);
4060 $this->_dumpproc('GPOS', $lookupID, $subtable, $Type, $PosFormat, $ptr, $currGlyph, $level);
4117 $matched = $this->checkContextMatchMultiple($CoverageInputGlyphs, $CoverageBacktrackGlyphs, $CoverageLookaheadGlyphs, $ignore, $ptr);
4146 $this->_dumpproc('GPOS', $lookupID, $subtable, $Type, $PosFormat, $ptr, $currGlyph, $level);
4165 private function checkContextMatch($Input, $Backtrack, $Lookahead, $ignore, $ptr)
4169 // return false if no match, else an array of ptr for matches (0=>0, 1=>3,...)
4171 $current_syllable = (isset($this->OTLdata[$ptr]['syllable']) ? $this->OTLdata[$ptr]['syllable'] : 0);
4174 $checkpos = $ptr;
4189 $matched = [0 => $ptr];
4190 $checkpos = $ptr;
4223 private function checkContextMatchMultiple($Input, $Backtrack, $Lookahead, $ignore, $ptr, $class0excl = '', $bclass0excl = '', $lclass0excl = '')
4227 // return false if no match, else an array of ptr for matches (0=>0, 1=>3,...)
4231 $current_syllable = (isset($this->OTLdata[$ptr]['syllable']) ? $this->OTLdata[$ptr]['syllable'] : 0);
4234 $checkpos = $ptr;
4252 $matched = [0 => $ptr];
4253 $checkpos = $ptr;
4291 private function checkContextMatchMultipleUni($Input, $Backtrack, $Lookahead, $ignore, $ptr, $class0excl = [], $bclass0excl = [], $lclass0excl = [])
4295 // return false if no match, else an array of ptr for matches (0=>0, 1=>3,...)
4299 $current_syllable = (isset($this->OTLdata[$ptr]['syllable']) ? $this->OTLdata[$ptr]['syllable'] : 0);
4302 $checkpos = $ptr;
4320 $matched = [0 => $ptr];
4321 $checkpos = $ptr;
6180 private function _dumpproc($GPOSSUB, $lookupID, $subtable, $Type, $Format, $ptr, $currGlyph, $level)
6185 echo 'Glyph position: ' . $ptr . ' Current Glyph: ' . $currGlyph . '<br />';
6188 if ($i == $ptr) {
6192 if ($i == $ptr) {
6199 if ($i == $ptr) {
6203 if ($i == $ptr) {