PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.18
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.18
1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 1.9.14 All 163 releases
woocommerce-pos / vendor_prefixed / dompdf / php-font-lib / src / FontLib / EncodingMap.php

EncodingMap.php in WCPOS – Point of Sale (POS) plugin for WooCommerce 1.10.18, at vendor_prefixed/dompdf/php-font-lib/src/FontLib/EncodingMap.php

35 lines 872 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * @package php-font-lib
5 * @link https://github.com/dompdf/php-font-lib
6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7 */
8 namespace WCPOS\Vendor\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 {
17 private $f;
18 function __construct($file)
19 {
20 $this->f = \fopen($file, "r");
21 }
22 function parse()
23 {
24 $map = array();
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 \ksort($map);
32 return $map;
33 }
34 }
35