@@ 2042-2054 (lines=13) @@ | ||
2039 | $sor = $eor; |
|
2040 | $eor = $cel % 2 ? 'R' : 'L'; |
|
2041 | } |
|
2042 | } elseif ($ta[$i] == TCPDF_FONT_DATA::$uni_LRE) { |
|
2043 | // X3. With each LRE, compute the least greater even embedding level. |
|
2044 | // a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to neutral. |
|
2045 | // b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status. |
|
2046 | $next_level = $cel + 2 - ($cel % 2); |
|
2047 | if ( $next_level < 62 ) { |
|
2048 | $remember[] = array('num' => TCPDF_FONT_DATA::$uni_LRE, 'cel' => $cel, 'dos' => $dos); |
|
2049 | $cel = $next_level; |
|
2050 | $dos = 'N'; |
|
2051 | $sor = $eor; |
|
2052 | $eor = $cel % 2 ? 'R' : 'L'; |
|
2053 | } |
|
2054 | } elseif ($ta[$i] == TCPDF_FONT_DATA::$uni_RLO) { |
|
2055 | // X4. With each RLO, compute the least greater odd embedding level. |
|
2056 | // a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to right-to-left. |
|
2057 | // b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status. |
|
@@ 2066-2078 (lines=13) @@ | ||
2063 | $sor = $eor; |
|
2064 | $eor = $cel % 2 ? 'R' : 'L'; |
|
2065 | } |
|
2066 | } elseif ($ta[$i] == TCPDF_FONT_DATA::$uni_LRO) { |
|
2067 | // X5. With each LRO, compute the least greater even embedding level. |
|
2068 | // a. If this new level would be valid, then this embedding code is valid. Remember (push) the current embedding level and override status. Reset the current level to this new level, and reset the override status to left-to-right. |
|
2069 | // b. If the new level would not be valid, then this code is invalid. Do not change the current level or override status. |
|
2070 | $next_level = $cel + 2 - ($cel % 2); |
|
2071 | if ( $next_level < 62 ) { |
|
2072 | $remember[] = array('num' => TCPDF_FONT_DATA::$uni_LRO, 'cel' => $cel, 'dos' => $dos); |
|
2073 | $cel = $next_level; |
|
2074 | $dos = 'L'; |
|
2075 | $sor = $eor; |
|
2076 | $eor = $cel % 2 ? 'R' : 'L'; |
|
2077 | } |
|
2078 | } elseif ($ta[$i] == TCPDF_FONT_DATA::$uni_PDF) { |
|
2079 | // X7. With each PDF, determine the matching embedding or override code. If there was a valid matching code, restore (pop) the last remembered (pushed) embedding level and directional override. |
|
2080 | if (count($remember)) { |
|
2081 | $last = count($remember ) - 1; |