PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.4.1
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.4.1
2.4.0 2.4.1 2.3.8 2.3.7 2.3.6 2.3.5 2.3.4 2.3.3 2.3.2 2.3.1 2.2.0 2.1.21 2.1.20 2.1.19 2.1.18 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.2 All 57 releases
easy-invoice / vendor / dompdf / php-font-lib / src / FontLib / EncodingMap.php

EncodingMap.php in Easy Invoice – Invoice Generator, PDF Quotes & Payments 2.4.1, at vendor/dompdf/php-font-lib/src/FontLib/EncodingMap.php

37 lines 781 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 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6 */
7
8 namespace FontLib;
9
10 /**
11 * Encoding map used to map a code point to a Unicode char.
12 *
13 * @package php-font-lib
14 */
15 class EncodingMap {
16 private $f;
17
18 function __construct($file) {
19 $this->f = fopen($file, "r");
20 }
21
22 function parse() {
23 $map = array();
24
25 while ($line = fgets($this->f)) {
26 if (preg_match('/^[\!\=]([0-9A-F]{2,})\s+U\+([0-9A-F]{2})([0-9A-F]{2})\s+([^\s]+)/', $line, $matches)) {
27 $unicode = (hexdec($matches[2]) << 8) + hexdec($matches[3]);
28 $map[hexdec($matches[1])] = array($unicode, $matches[4]);
29 }
30 }
31
32 ksort($map);
33
34 return $map;
35 }
36 }
37