PluginProbe
Yatra – Travel Booking & Tour Operator Software / trunk
Yatra – Travel Booking & Tour Operator Software vtrunk
3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 2.0.10 2.0.11 All 82 releases
yatra / vendor / phenx / php-font-lib / src / FontLib / EncodingMap.php

EncodingMap.php in Yatra – Travel Booking & Tour Operator Software trunk, at vendor/phenx/php-font-lib/src/FontLib/EncodingMap.php

38 lines 836 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package php-font-lib
4 * @link https://github.com/dompdf/php-font-lib
5 * @author Fabien Ménager <fabien.menager@gmail.com>
6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7 */
8
9 namespace FontLib;
10
11 /**
12 * Encoding map used to map a code point to a Unicode char.
13 *
14 * @package php-font-lib
15 */
16 class EncodingMap {
17 private $f;
18
19 function __construct($file) {
20 $this->f = fopen($file, "r");
21 }
22
23 function parse() {
24 $map = array();
25
26 while ($line = fgets($this->f)) {
27 if (preg_match('/^[\!\=]([0-9A-F]{2,})\s+U\+([0-9A-F]{2})([0-9A-F]{2})\s+([^\s]+)/', $line, $matches)) {
28 $unicode = (hexdec($matches[2]) << 8) + hexdec($matches[3]);
29 $map[hexdec($matches[1])] = array($unicode, $matches[4]);
30 }
31 }
32
33 ksort($map);
34
35 return $map;
36 }
37 }
38