Passed
Pull Request — master (#500)
by Konrad
05:56 queued 03:54
created

PostScriptGlyphs::getCodePoint()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 9
ccs 5
cts 5
cp 1
crap 2
rs 10
1
<?php
2
3
/**
4
 * @file This file is part of the PdfParser library.
5
 *
6
 * @author  Dāvis Mosāns <[email protected]>
7
 * @date    2019-09-17
8
 *
9
 * @license LGPLv3
10
 * @url     <https://github.com/smalot/pdfparser>
11
 *
12
 *  PdfParser is a pdf library written in PHP, extraction oriented.
13
 *  Copyright (C) 2017 - Sébastien MALOT <[email protected]>
14
 *
15
 *  This program is free software: you can redistribute it and/or modify
16
 *  it under the terms of the GNU Lesser General Public License as published by
17
 *  the Free Software Foundation, either version 3 of the License, or
18
 *  (at your option) any later version.
19
 *
20
 *  This program is distributed in the hope that it will be useful,
21
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
22
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
 *  GNU Lesser General Public License for more details.
24
 *
25
 *  You should have received a copy of the GNU Lesser General Public License
26
 *  along with this program.
27
 *  If not, see <http://www.pdfparser.org/sites/default/LICENSE.txt>.
28
 */
29
30
namespace Smalot\PdfParser\Encoding;
31
32
/**
33
 * Class PostScriptGlyphs
34
 */
35
class PostScriptGlyphs
36
{
37
    /**
38
     * The mapping tables have been converted from https://github.com/OpenPrinting/cups-filters/blob/master/fontembed/aglfn13.c,
39
     * part of the OpenPrinting/cups-filters package, which itself is licensed under the MIT license and lists this specific code part as:
40
     * Copyright 2008,2012 Tobias Hoffmann under the Expat license (https://www.gnu.org/licenses/license-list.html#Expat)
41
     */
42 4
    public static function getGlyphs(): array
43
    {
44
        return [
45 4
            'space' => '0x00a0',
46
            'exclam' => '0x0021',
47
            'quotedbl' => '0x0022',
48
            'numbersign' => '0x0023',
49
            'dollar' => '0x0024',
50
            'percent' => '0x0025',
51
            'ampersand' => '0x0026',
52
            'quotesingle' => '0x0027',
53
            'parenleft' => '0x0028',
54
            'parenright' => '0x0029',
55
            'asterisk' => '0x002a',
56
            'plus' => '0x002b',
57
            'comma' => '0x002c',
58
            'hyphen' => '0x002d',
59
            'period' => '0x002e',
60
            'slash' => '0x002f',
61
            'zero' => '0x0030',
62
            'one' => '0x0031',
63
            'two' => '0x0032',
64
            'three' => '0x0033',
65
            'four' => '0x0034',
66
            'five' => '0x0035',
67
            'six' => '0x0036',
68
            'seven' => '0x0037',
69
            'eight' => '0x0038',
70
            'nine' => '0x0039',
71
            'colon' => '0x003a',
72
            'semicolon' => '0x003b',
73
            'less' => '0x003c',
74
            'equal' => '0x003d',
75
            'greater' => '0x003e',
76
            'question' => '0x003f',
77
            'at' => '0x0040',
78
            'A' => '0x0041',
79
            'B' => '0x0042',
80
            'C' => '0x0043',
81
            'D' => '0x0044',
82
            'E' => '0x0045',
83
            'F' => '0x0046',
84
            'G' => '0x0047',
85
            'H' => '0x0048',
86
            'I' => '0x0049',
87
            'J' => '0x004a',
88
            'K' => '0x004b',
89
            'L' => '0x004c',
90
            'M' => '0x004d',
91
            'N' => '0x004e',
92
            'O' => '0x004f',
93
            'P' => '0x0050',
94
            'Q' => '0x0051',
95
            'R' => '0x0052',
96
            'S' => '0x0053',
97
            'T' => '0x0054',
98
            'U' => '0x0055',
99
            'V' => '0x0056',
100
            'W' => '0x0057',
101
            'X' => '0x0058',
102
            'Y' => '0x0059',
103
            'Z' => '0x005a',
104
            'bracketleft' => '0x005b',
105
            'backslash' => '0x005c',
106
            'bracketright' => '0x005d',
107
            'asciicircum' => '0x005e',
108
            'underscore' => '0x005f',
109
            'grave' => '0x0060',
110
            'a' => '0x0061',
111
            'b' => '0x0062',
112
            'c' => '0x0063',
113
            'd' => '0x0064',
114
            'e' => '0x0065',
115
            'f' => '0x0066',
116
            'g' => '0x0067',
117
            'h' => '0x0068',
118
            'i' => '0x0069',
119
            'j' => '0x006a',
120
            'k' => '0x006b',
121
            'l' => '0x006c',
122
            'm' => '0x006d',
123
            'n' => '0x006e',
124
            'o' => '0x006f',
125
            'p' => '0x0070',
126
            'q' => '0x0071',
127
            'r' => '0x0072',
128
            's' => '0x0073',
129
            't' => '0x0074',
130
            'u' => '0x0075',
131
            'v' => '0x0076',
132
            'w' => '0x0077',
133
            'x' => '0x0078',
134
            'y' => '0x0079',
135
            'z' => '0x007a',
136
            'braceleft' => '0x007b',
137
            'bar' => '0x007c',
138
            'braceright' => '0x007d',
139
            'asciitilde' => '0x007e',
140
            'exclamdown' => '0x00a1',
141
            'cent' => '0x00a2',
142
            'sterling' => '0x00a3',
143
            'currency' => '0x00a4',
144
            'yen' => '0x00a5',
145
            'brokenbar' => '0x00a6',
146
            'section' => '0x00a7',
147
            'dieresis' => '0x00a8',
148
            'copyright' => '0x00a9',
149
            'ordfeminine' => '0x00aa',
150
            'guillemotleft' => '0x00ab',
151
            'logicalnot' => '0x00ac',
152
            'minus' => '0x2212',
153
            'registered' => '0x00ae',
154
            'macron' => '0x02c9',
155
            'degree' => '0x00b0',
156
            'plusminus' => '0x00b1',
157
            'twosuperior' => '0x00b2',
158
            'threesuperior' => '0x00b3',
159
            'acute' => '0x00b4',
160
            'mu' => '0x03bc',
161
            'paragraph' => '0x00b6',
162
            'periodcentered' => '0x2219',
163
            'cedilla' => '0x00b8',
164
            'onesuperior' => '0x00b9',
165
            'ordmasculine' => '0x00ba',
166
            'guillemotright' => '0x00bb',
167
            'onequarter' => '0x00bc',
168
            'onehalf' => '0x00bd',
169
            'threequarters' => '0x00be',
170
            'questiondown' => '0x00bf',
171
            'Agrave' => '0x00c0',
172
            'Aacute' => '0x00c1',
173
            'Acircumflex' => '0x00c2',
174
            'Atilde' => '0x00c3',
175
            'Adieresis' => '0x00c4',
176
            'Aring' => '0x00c5',
177
            'AE' => '0x00c6',
178
            'Ccedilla' => '0x00c7',
179
            'Egrave' => '0x00c8',
180
            'Eacute' => '0x00c9',
181
            'Ecircumflex' => '0x00ca',
182
            'Edieresis' => '0x00cb',
183
            'Igrave' => '0x00cc',
184
            'Iacute' => '0x00cd',
185
            'Icircumflex' => '0x00ce',
186
            'Idieresis' => '0x00cf',
187
            'Eth' => '0x00d0',
188
            'Ntilde' => '0x00d1',
189
            'Ograve' => '0x00d2',
190
            'Oacute' => '0x00d3',
191
            'Ocircumflex' => '0x00d4',
192
            'Otilde' => '0x00d5',
193
            'Odieresis' => '0x00d6',
194
            'multiply' => '0x00d7',
195
            'Oslash' => '0x00d8',
196
            'Ugrave' => '0x00d9',
197
            'Uacute' => '0x00da',
198
            'Ucircumflex' => '0x00db',
199
            'Udieresis' => '0x00dc',
200
            'Yacute' => '0x00dd',
201
            'Thorn' => '0x00de',
202
            'germandbls' => '0x00df',
203
            'agrave' => '0x00e0',
204
            'aacute' => '0x00e1',
205
            'acircumflex' => '0x00e2',
206
            'atilde' => '0x00e3',
207
            'adieresis' => '0x00e4',
208
            'aring' => '0x00e5',
209
            'ae' => '0x00e6',
210
            'ccedilla' => '0x00e7',
211
            'egrave' => '0x00e8',
212
            'eacute' => '0x00e9',
213
            'ecircumflex' => '0x00ea',
214
            'edieresis' => '0x00eb',
215
            'igrave' => '0x00ec',
216
            'iacute' => '0x00ed',
217
            'icircumflex' => '0x00ee',
218
            'idieresis' => '0x00ef',
219
            'eth' => '0x00f0',
220
            'ntilde' => '0x00f1',
221
            'ograve' => '0x00f2',
222
            'oacute' => '0x00f3',
223
            'ocircumflex' => '0x00f4',
224
            'otilde' => '0x00f5',
225
            'odieresis' => '0x00f6',
226
            'divide' => '0x00f7',
227
            'oslash' => '0x00f8',
228
            'ugrave' => '0x00f9',
229
            'uacute' => '0x00fa',
230
            'ucircumflex' => '0x00fb',
231
            'udieresis' => '0x00fc',
232
            'yacute' => '0x00fd',
233
            'thorn' => '0x00fe',
234
            'ydieresis' => '0x00ff',
235
            'Amacron' => '0x0100',
236
            'amacron' => '0x0101',
237
            'Abreve' => '0x0102',
238
            'abreve' => '0x0103',
239
            'Aogonek' => '0x0104',
240
            'aogonek' => '0x0105',
241
            'Cacute' => '0x0106',
242
            'cacute' => '0x0107',
243
            'Ccircumflex' => '0x0108',
244
            'ccircumflex' => '0x0109',
245
            'Cdotaccent' => '0x010a',
246
            'cdotaccent' => '0x010b',
247
            'Ccaron' => '0x010c',
248
            'ccaron' => '0x010d',
249
            'Dcaron' => '0x010e',
250
            'dcaron' => '0x010f',
251
            'Dcroat' => '0x0110',
252
            'dcroat' => '0x0111',
253
            'Emacron' => '0x0112',
254
            'emacron' => '0x0113',
255
            'Ebreve' => '0x0114',
256
            'ebreve' => '0x0115',
257
            'Edotaccent' => '0x0116',
258
            'edotaccent' => '0x0117',
259
            'Eogonek' => '0x0118',
260
            'eogonek' => '0x0119',
261
            'Ecaron' => '0x011a',
262
            'ecaron' => '0x011b',
263
            'Gcircumflex' => '0x011c',
264
            'gcircumflex' => '0x011d',
265
            'Gbreve' => '0x011e',
266
            'gbreve' => '0x011f',
267
            'Gdotaccent' => '0x0120',
268
            'gdotaccent' => '0x0121',
269
            'Gcommaaccent' => '0x0122',
270
            'gcommaaccent' => '0x0123',
271
            'Hcircumflex' => '0x0124',
272
            'hcircumflex' => '0x0125',
273
            'Hbar' => '0x0126',
274
            'hbar' => '0x0127',
275
            'Itilde' => '0x0128',
276
            'itilde' => '0x0129',
277
            'Imacron' => '0x012a',
278
            'imacron' => '0x012b',
279
            'Ibreve' => '0x012c',
280
            'ibreve' => '0x012d',
281
            'Iogonek' => '0x012e',
282
            'iogonek' => '0x012f',
283
            'Idotaccent' => '0x0130',
284
            'dotlessi' => '0x0131',
285
            'IJ' => '0x0132',
286
            'ij' => '0x0133',
287
            'Jcircumflex' => '0x0134',
288
            'jcircumflex' => '0x0135',
289
            'Kcommaaccent' => '0x0136',
290
            'kcommaaccent' => '0x0137',
291
            'kgreenlandic' => '0x0138',
292
            'Lacute' => '0x0139',
293
            'lacute' => '0x013a',
294
            'Lcommaaccent' => '0x013b',
295
            'lcommaaccent' => '0x013c',
296
            'Lcaron' => '0x013d',
297
            'lcaron' => '0x013e',
298
            'Ldot' => '0x013f',
299
            'ldot' => '0x0140',
300
            'Lslash' => '0x0141',
301
            'lslash' => '0x0142',
302
            'Nacute' => '0x0143',
303
            'nacute' => '0x0144',
304
            'Ncommaaccent' => '0x0145',
305
            'ncommaaccent' => '0x0146',
306
            'Ncaron' => '0x0147',
307
            'ncaron' => '0x0148',
308
            'napostrophe' => '0x0149',
309
            'Eng' => '0x014a',
310
            'eng' => '0x014b',
311
            'Omacron' => '0x014c',
312
            'omacron' => '0x014d',
313
            'Obreve' => '0x014e',
314
            'obreve' => '0x014f',
315
            'Ohungarumlaut' => '0x0150',
316
            'ohungarumlaut' => '0x0151',
317
            'OE' => '0x0152',
318
            'oe' => '0x0153',
319
            'Racute' => '0x0154',
320
            'racute' => '0x0155',
321
            'Rcommaaccent' => '0x0156',
322
            'rcommaaccent' => '0x0157',
323
            'Rcaron' => '0x0158',
324
            'rcaron' => '0x0159',
325
            'Sacute' => '0x015a',
326
            'sacute' => '0x015b',
327
            'Scircumflex' => '0x015c',
328
            'scircumflex' => '0x015d',
329
            'Scedilla' => '0xf6c1',
330
            'scedilla' => '0xf6c2',
331
            'Scaron' => '0x0160',
332
            'scaron' => '0x0161',
333
            'Tcommaaccent' => '0x021a',
334
            'tcommaaccent' => '0x021b',
335
            'Tcaron' => '0x0164',
336
            'tcaron' => '0x0165',
337
            'Tbar' => '0x0166',
338
            'tbar' => '0x0167',
339
            'Utilde' => '0x0168',
340
            'utilde' => '0x0169',
341
            'Umacron' => '0x016a',
342
            'umacron' => '0x016b',
343
            'Ubreve' => '0x016c',
344
            'ubreve' => '0x016d',
345
            'Uring' => '0x016e',
346
            'uring' => '0x016f',
347
            'Uhungarumlaut' => '0x0170',
348
            'uhungarumlaut' => '0x0171',
349
            'Uogonek' => '0x0172',
350
            'uogonek' => '0x0173',
351
            'Wcircumflex' => '0x0174',
352
            'wcircumflex' => '0x0175',
353
            'Ycircumflex' => '0x0176',
354
            'ycircumflex' => '0x0177',
355
            'Ydieresis' => '0x0178',
356
            'Zacute' => '0x0179',
357
            'zacute' => '0x017a',
358
            'Zdotaccent' => '0x017b',
359
            'zdotaccent' => '0x017c',
360
            'Zcaron' => '0x017d',
361
            'zcaron' => '0x017e',
362
            'longs' => '0x017f',
363
            'florin' => '0x0192',
364
            'Ohorn' => '0x01a0',
365
            'ohorn' => '0x01a1',
366
            'Uhorn' => '0x01af',
367
            'uhorn' => '0x01b0',
368
            'Gcaron' => '0x01e6',
369
            'gcaron' => '0x01e7',
370
            'Aringacute' => '0x01fa',
371
            'aringacute' => '0x01fb',
372
            'AEacute' => '0x01fc',
373
            'aeacute' => '0x01fd',
374
            'Oslashacute' => '0x01fe',
375
            'oslashacute' => '0x01ff',
376
            'Scommaaccent' => '0x0218',
377
            'scommaaccent' => '0x0219',
378
            'afii57929' => '0x02bc',
379
            'afii64937' => '0x02bd',
380
            'circumflex' => '0x02c6',
381
            'caron' => '0x02c7',
382
            'breve' => '0x02d8',
383
            'dotaccent' => '0x02d9',
384
            'ring' => '0x02da',
385
            'ogonek' => '0x02db',
386
            'tilde' => '0x02dc',
387
            'hungarumlaut' => '0x02dd',
388
            'gravecomb' => '0x0300',
389
            'acutecomb' => '0x0301',
390
            'tildecomb' => '0x0303',
391
            'hookabovecomb' => '0x0309',
392
            'dotbelowcomb' => '0x0323',
393
            'tonos' => '0x0384',
394
            'dieresistonos' => '0x0385',
395
            'Alphatonos' => '0x0386',
396
            'anoteleia' => '0x0387',
397
            'Epsilontonos' => '0x0388',
398
            'Etatonos' => '0x0389',
399
            'Iotatonos' => '0x038a',
400
            'Omicrontonos' => '0x038c',
401
            'Upsilontonos' => '0x038e',
402
            'Omegatonos' => '0x038f',
403
            'iotadieresistonos' => '0x0390',
404
            'Alpha' => '0x0391',
405
            'Beta' => '0x0392',
406
            'Gamma' => '0x0393',
407
            'Delta' => '0x2206',
408
            'Epsilon' => '0x0395',
409
            'Zeta' => '0x0396',
410
            'Eta' => '0x0397',
411
            'Theta' => '0x0398',
412
            'Iota' => '0x0399',
413
            'Kappa' => '0x039a',
414
            'Lambda' => '0x039b',
415
            'Mu' => '0x039c',
416
            'Nu' => '0x039d',
417
            'Xi' => '0x039e',
418
            'Omicron' => '0x039f',
419
            'Pi' => '0x03a0',
420
            'Rho' => '0x03a1',
421
            'Sigma' => '0x03a3',
422
            'Tau' => '0x03a4',
423
            'Upsilon' => '0x03a5',
424
            'Phi' => '0x03a6',
425
            'Chi' => '0x03a7',
426
            'Psi' => '0x03a8',
427
            'Omega' => '0x2126',
428
            'Iotadieresis' => '0x03aa',
429
            'Upsilondieresis' => '0x03ab',
430
            'alphatonos' => '0x03ac',
431
            'epsilontonos' => '0x03ad',
432
            'etatonos' => '0x03ae',
433
            'iotatonos' => '0x03af',
434
            'upsilondieresistonos' => '0x03b0',
435
            'alpha' => '0x03b1',
436
            'beta' => '0x03b2',
437
            'gamma' => '0x03b3',
438
            'delta' => '0x03b4',
439
            'epsilon' => '0x03b5',
440
            'zeta' => '0x03b6',
441
            'eta' => '0x03b7',
442
            'theta' => '0x03b8',
443
            'iota' => '0x03b9',
444
            'kappa' => '0x03ba',
445
            'lambda' => '0x03bb',
446
            'nu' => '0x03bd',
447
            'xi' => '0x03be',
448
            'omicron' => '0x03bf',
449
            'pi' => '0x03c0',
450
            'rho' => '0x03c1',
451
            'sigma1' => '0x03c2',
452
            'sigma' => '0x03c3',
453
            'tau' => '0x03c4',
454
            'upsilon' => '0x03c5',
455
            'phi' => '0x03c6',
456
            'chi' => '0x03c7',
457
            'psi' => '0x03c8',
458
            'omega' => '0x03c9',
459
            'iotadieresis' => '0x03ca',
460
            'upsilondieresis' => '0x03cb',
461
            'omicrontonos' => '0x03cc',
462
            'upsilontonos' => '0x03cd',
463
            'omegatonos' => '0x03ce',
464
            'theta1' => '0x03d1',
465
            'Upsilon1' => '0x03d2',
466
            'phi1' => '0x03d5',
467
            'omega1' => '0x03d6',
468
            'afii10023' => '0x0401',
469
            'afii10051' => '0x0402',
470
            'afii10052' => '0x0403',
471
            'afii10053' => '0x0404',
472
            'afii10054' => '0x0405',
473
            'afii10055' => '0x0406',
474
            'afii10056' => '0x0407',
475
            'afii10057' => '0x0408',
476
            'afii10058' => '0x0409',
477
            'afii10059' => '0x040a',
478
            'afii10060' => '0x040b',
479
            'afii10061' => '0x040c',
480
            'afii10062' => '0x040e',
481
            'afii10145' => '0x040f',
482
            'afii10017' => '0x0410',
483
            'afii10018' => '0x0411',
484
            'afii10019' => '0x0412',
485
            'afii10020' => '0x0413',
486
            'afii10021' => '0x0414',
487
            'afii10022' => '0x0415',
488
            'afii10024' => '0x0416',
489
            'afii10025' => '0x0417',
490
            'afii10026' => '0x0418',
491
            'afii10027' => '0x0419',
492
            'afii10028' => '0x041a',
493
            'afii10029' => '0x041b',
494
            'afii10030' => '0x041c',
495
            'afii10031' => '0x041d',
496
            'afii10032' => '0x041e',
497
            'afii10033' => '0x041f',
498
            'afii10034' => '0x0420',
499
            'afii10035' => '0x0421',
500
            'afii10036' => '0x0422',
501
            'afii10037' => '0x0423',
502
            'afii10038' => '0x0424',
503
            'afii10039' => '0x0425',
504
            'afii10040' => '0x0426',
505
            'afii10041' => '0x0427',
506
            'afii10042' => '0x0428',
507
            'afii10043' => '0x0429',
508
            'afii10044' => '0x042a',
509
            'afii10045' => '0x042b',
510
            'afii10046' => '0x042c',
511
            'afii10047' => '0x042d',
512
            'afii10048' => '0x042e',
513
            'afii10049' => '0x042f',
514
            'afii10065' => '0x0430',
515
            'afii10066' => '0x0431',
516
            'afii10067' => '0x0432',
517
            'afii10068' => '0x0433',
518
            'afii10069' => '0x0434',
519
            'afii10070' => '0x0435',
520
            'afii10072' => '0x0436',
521
            'afii10073' => '0x0437',
522
            'afii10074' => '0x0438',
523
            'afii10075' => '0x0439',
524
            'afii10076' => '0x043a',
525
            'afii10077' => '0x043b',
526
            'afii10078' => '0x043c',
527
            'afii10079' => '0x043d',
528
            'afii10080' => '0x043e',
529
            'afii10081' => '0x043f',
530
            'afii10082' => '0x0440',
531
            'afii10083' => '0x0441',
532
            'afii10084' => '0x0442',
533
            'afii10085' => '0x0443',
534
            'afii10086' => '0x0444',
535
            'afii10087' => '0x0445',
536
            'afii10088' => '0x0446',
537
            'afii10089' => '0x0447',
538
            'afii10090' => '0x0448',
539
            'afii10091' => '0x0449',
540
            'afii10092' => '0x044a',
541
            'afii10093' => '0x044b',
542
            'afii10094' => '0x044c',
543
            'afii10095' => '0x044d',
544
            'afii10096' => '0x044e',
545
            'afii10097' => '0x044f',
546
            'afii10071' => '0x0451',
547
            'afii10099' => '0x0452',
548
            'afii10100' => '0x0453',
549
            'afii10101' => '0x0454',
550
            'afii10102' => '0x0455',
551
            'afii10103' => '0x0456',
552
            'afii10104' => '0x0457',
553
            'afii10105' => '0x0458',
554
            'afii10106' => '0x0459',
555
            'afii10107' => '0x045a',
556
            'afii10108' => '0x045b',
557
            'afii10109' => '0x045c',
558
            'afii10110' => '0x045e',
559
            'afii10193' => '0x045f',
560
            'afii10146' => '0x0462',
561
            'afii10194' => '0x0463',
562
            'afii10147' => '0x0472',
563
            'afii10195' => '0x0473',
564
            'afii10148' => '0x0474',
565
            'afii10196' => '0x0475',
566
            'afii10050' => '0x0490',
567
            'afii10098' => '0x0491',
568
            'afii10846' => '0x04d9',
569
            'afii57799' => '0x05b0',
570
            'afii57801' => '0x05b1',
571
            'afii57800' => '0x05b2',
572
            'afii57802' => '0x05b3',
573
            'afii57793' => '0x05b4',
574
            'afii57794' => '0x05b5',
575
            'afii57795' => '0x05b6',
576
            'afii57798' => '0x05b7',
577
            'afii57797' => '0x05b8',
578
            'afii57806' => '0x05b9',
579
            'afii57796' => '0x05bb',
580
            'afii57807' => '0x05bc',
581
            'afii57839' => '0x05bd',
582
            'afii57645' => '0x05be',
583
            'afii57841' => '0x05bf',
584
            'afii57842' => '0x05c0',
585
            'afii57804' => '0x05c1',
586
            'afii57803' => '0x05c2',
587
            'afii57658' => '0x05c3',
588
            'afii57664' => '0x05d0',
589
            'afii57665' => '0x05d1',
590
            'afii57666' => '0x05d2',
591
            'afii57667' => '0x05d3',
592
            'afii57668' => '0x05d4',
593
            'afii57669' => '0x05d5',
594
            'afii57670' => '0x05d6',
595
            'afii57671' => '0x05d7',
596
            'afii57672' => '0x05d8',
597
            'afii57673' => '0x05d9',
598
            'afii57674' => '0x05da',
599
            'afii57675' => '0x05db',
600
            'afii57676' => '0x05dc',
601
            'afii57677' => '0x05dd',
602
            'afii57678' => '0x05de',
603
            'afii57679' => '0x05df',
604
            'afii57680' => '0x05e0',
605
            'afii57681' => '0x05e1',
606
            'afii57682' => '0x05e2',
607
            'afii57683' => '0x05e3',
608
            'afii57684' => '0x05e4',
609
            'afii57685' => '0x05e5',
610
            'afii57686' => '0x05e6',
611
            'afii57687' => '0x05e7',
612
            'afii57688' => '0x05e8',
613
            'afii57689' => '0x05e9',
614
            'afii57690' => '0x05ea',
615
            'afii57716' => '0x05f0',
616
            'afii57717' => '0x05f1',
617
            'afii57718' => '0x05f2',
618
            'afii57388' => '0x060c',
619
            'afii57403' => '0x061b',
620
            'afii57407' => '0x061f',
621
            'afii57409' => '0x0621',
622
            'afii57410' => '0x0622',
623
            'afii57411' => '0x0623',
624
            'afii57412' => '0x0624',
625
            'afii57413' => '0x0625',
626
            'afii57414' => '0x0626',
627
            'afii57415' => '0x0627',
628
            'afii57416' => '0x0628',
629
            'afii57417' => '0x0629',
630
            'afii57418' => '0x062a',
631
            'afii57419' => '0x062b',
632
            'afii57420' => '0x062c',
633
            'afii57421' => '0x062d',
634
            'afii57422' => '0x062e',
635
            'afii57423' => '0x062f',
636
            'afii57424' => '0x0630',
637
            'afii57425' => '0x0631',
638
            'afii57426' => '0x0632',
639
            'afii57427' => '0x0633',
640
            'afii57428' => '0x0634',
641
            'afii57429' => '0x0635',
642
            'afii57430' => '0x0636',
643
            'afii57431' => '0x0637',
644
            'afii57432' => '0x0638',
645
            'afii57433' => '0x0639',
646
            'afii57434' => '0x063a',
647
            'afii57440' => '0x0640',
648
            'afii57441' => '0x0641',
649
            'afii57442' => '0x0642',
650
            'afii57443' => '0x0643',
651
            'afii57444' => '0x0644',
652
            'afii57445' => '0x0645',
653
            'afii57446' => '0x0646',
654
            'afii57470' => '0x0647',
655
            'afii57448' => '0x0648',
656
            'afii57449' => '0x0649',
657
            'afii57450' => '0x064a',
658
            'afii57451' => '0x064b',
659
            'afii57452' => '0x064c',
660
            'afii57453' => '0x064d',
661
            'afii57454' => '0x064e',
662
            'afii57455' => '0x064f',
663
            'afii57456' => '0x0650',
664
            'afii57457' => '0x0651',
665
            'afii57458' => '0x0652',
666
            'afii57392' => '0x0660',
667
            'afii57393' => '0x0661',
668
            'afii57394' => '0x0662',
669
            'afii57395' => '0x0663',
670
            'afii57396' => '0x0664',
671
            'afii57397' => '0x0665',
672
            'afii57398' => '0x0666',
673
            'afii57399' => '0x0667',
674
            'afii57400' => '0x0668',
675
            'afii57401' => '0x0669',
676
            'afii57381' => '0x066a',
677
            'afii63167' => '0x066d',
678
            'afii57511' => '0x0679',
679
            'afii57506' => '0x067e',
680
            'afii57507' => '0x0686',
681
            'afii57512' => '0x0688',
682
            'afii57513' => '0x0691',
683
            'afii57508' => '0x0698',
684
            'afii57505' => '0x06a4',
685
            'afii57509' => '0x06af',
686
            'afii57514' => '0x06ba',
687
            'afii57519' => '0x06d2',
688
            'afii57534' => '0x06d5',
689
            'Wgrave' => '0x1e80',
690
            'wgrave' => '0x1e81',
691
            'Wacute' => '0x1e82',
692
            'wacute' => '0x1e83',
693
            'Wdieresis' => '0x1e84',
694
            'wdieresis' => '0x1e85',
695
            'Ygrave' => '0x1ef2',
696
            'ygrave' => '0x1ef3',
697
            'afii61664' => '0x200c',
698
            'afii301' => '0x200d',
699
            'afii299' => '0x200e',
700
            'afii300' => '0x200f',
701
            'figuredash' => '0x2012',
702
            'endash' => '0x2013',
703
            'emdash' => '0x2014',
704
            'afii00208' => '0x2015',
705
            'underscoredbl' => '0x2017',
706
            'quoteleft' => '0x2018',
707
            'quoteright' => '0x2019',
708
            'quotesinglbase' => '0x201a',
709
            'quotereversed' => '0x201b',
710
            'quotedblleft' => '0x201c',
711
            'quotedblright' => '0x201d',
712
            'quotedblbase' => '0x201e',
713
            'dagger' => '0x2020',
714
            'daggerdbl' => '0x2021',
715
            'bullet' => '0x2022',
716
            'onedotenleader' => '0x2024',
717
            'twodotenleader' => '0x2025',
718
            'ellipsis' => '0x2026',
719
            'afii61573' => '0x202c',
720
            'afii61574' => '0x202d',
721
            'afii61575' => '0x202e',
722
            'perthousand' => '0x2030',
723
            'minute' => '0x2032',
724
            'second' => '0x2033',
725
            'guilsinglleft' => '0x2039',
726
            'guilsinglright' => '0x203a',
727
            'exclamdbl' => '0x203c',
728
            'fraction' => '0x2215',
729
            'zerosuperior' => '0x2070',
730
            'foursuperior' => '0x2074',
731
            'fivesuperior' => '0x2075',
732
            'sixsuperior' => '0x2076',
733
            'sevensuperior' => '0x2077',
734
            'eightsuperior' => '0x2078',
735
            'ninesuperior' => '0x2079',
736
            'parenleftsuperior' => '0x207d',
737
            'parenrightsuperior' => '0x207e',
738
            'nsuperior' => '0x207f',
739
            'zeroinferior' => '0x2080',
740
            'oneinferior' => '0x2081',
741
            'twoinferior' => '0x2082',
742
            'threeinferior' => '0x2083',
743
            'fourinferior' => '0x2084',
744
            'fiveinferior' => '0x2085',
745
            'sixinferior' => '0x2086',
746
            'seveninferior' => '0x2087',
747
            'eightinferior' => '0x2088',
748
            'nineinferior' => '0x2089',
749
            'parenleftinferior' => '0x208d',
750
            'parenrightinferior' => '0x208e',
751
            'colonmonetary' => '0x20a1',
752
            'franc' => '0x20a3',
753
            'lira' => '0x20a4',
754
            'peseta' => '0x20a7',
755
            'afii57636' => '0x20aa',
756
            'dong' => '0x20ab',
757
            'Euro' => '0x20ac',
758
            'afii61248' => '0x2105',
759
            'Ifraktur' => '0x2111',
760
            'afii61289' => '0x2113',
761
            'afii61352' => '0x2116',
762
            'weierstrass' => '0x2118',
763
            'Rfraktur' => '0x211c',
764
            'prescription' => '0x211e',
765
            'trademark' => '0x2122',
766
            'estimated' => '0x212e',
767
            'aleph' => '0x2135',
768
            'onethird' => '0x2153',
769
            'twothirds' => '0x2154',
770
            'oneeighth' => '0x215b',
771
            'threeeighths' => '0x215c',
772
            'fiveeighths' => '0x215d',
773
            'seveneighths' => '0x215e',
774
            'arrowleft' => '0x2190',
775
            'arrowup' => '0x2191',
776
            'arrowright' => '0x2192',
777
            'arrowdown' => '0x2193',
778
            'arrowboth' => '0x2194',
779
            'arrowupdn' => '0x2195',
780
            'arrowupdnbse' => '0x21a8',
781
            'carriagereturn' => '0x21b5',
782
            'arrowdblleft' => '0x21d0',
783
            'arrowdblup' => '0x21d1',
784
            'arrowdblright' => '0x21d2',
785
            'arrowdbldown' => '0x21d3',
786
            'arrowdblboth' => '0x21d4',
787
            'universal' => '0x2200',
788
            'partialdiff' => '0x2202',
789
            'existential' => '0x2203',
790
            'emptyset' => '0x2205',
791
            'gradient' => '0x2207',
792
            'element' => '0x2208',
793
            'notelement' => '0x2209',
794
            'suchthat' => '0x220b',
795
            'product' => '0x220f',
796
            'summation' => '0x2211',
797
            'asteriskmath' => '0x2217',
798
            'radical' => '0x221a',
799
            'proportional' => '0x221d',
800
            'infinity' => '0x221e',
801
            'orthogonal' => '0x221f',
802
            'angle' => '0x2220',
803
            'logicaland' => '0x2227',
804
            'logicalor' => '0x2228',
805
            'intersection' => '0x2229',
806
            'union' => '0x222a',
807
            'integral' => '0x222b',
808
            'therefore' => '0x2234',
809
            'similar' => '0x223c',
810
            'congruent' => '0x2245',
811
            'approxequal' => '0x2248',
812
            'notequal' => '0x2260',
813
            'equivalence' => '0x2261',
814
            'lessequal' => '0x2264',
815
            'greaterequal' => '0x2265',
816
            'propersubset' => '0x2282',
817
            'propersuperset' => '0x2283',
818
            'notsubset' => '0x2284',
819
            'reflexsubset' => '0x2286',
820
            'reflexsuperset' => '0x2287',
821
            'circleplus' => '0x2295',
822
            'circlemultiply' => '0x2297',
823
            'perpendicular' => '0x22a5',
824
            'dotmath' => '0x22c5',
825
            'house' => '0x2302',
826
            'revlogicalnot' => '0x2310',
827
            'integraltp' => '0x2320',
828
            'integralbt' => '0x2321',
829
            'angleleft' => '0x2329',
830
            'angleright' => '0x232a',
831
            'SF100000' => '0x2500',
832
            'SF110000' => '0x2502',
833
            'SF010000' => '0x250c',
834
            'SF030000' => '0x2510',
835
            'SF020000' => '0x2514',
836
            'SF040000' => '0x2518',
837
            'SF080000' => '0x251c',
838
            'SF090000' => '0x2524',
839
            'SF060000' => '0x252c',
840
            'SF070000' => '0x2534',
841
            'SF050000' => '0x253c',
842
            'SF430000' => '0x2550',
843
            'SF240000' => '0x2551',
844
            'SF510000' => '0x2552',
845
            'SF520000' => '0x2553',
846
            'SF390000' => '0x2554',
847
            'SF220000' => '0x2555',
848
            'SF210000' => '0x2556',
849
            'SF250000' => '0x2557',
850
            'SF500000' => '0x2558',
851
            'SF490000' => '0x2559',
852
            'SF380000' => '0x255a',
853
            'SF280000' => '0x255b',
854
            'SF270000' => '0x255c',
855
            'SF260000' => '0x255d',
856
            'SF360000' => '0x255e',
857
            'SF370000' => '0x255f',
858
            'SF420000' => '0x2560',
859
            'SF190000' => '0x2561',
860
            'SF200000' => '0x2562',
861
            'SF230000' => '0x2563',
862
            'SF470000' => '0x2564',
863
            'SF480000' => '0x2565',
864
            'SF410000' => '0x2566',
865
            'SF450000' => '0x2567',
866
            'SF460000' => '0x2568',
867
            'SF400000' => '0x2569',
868
            'SF540000' => '0x256a',
869
            'SF530000' => '0x256b',
870
            'SF440000' => '0x256c',
871
            'upblock' => '0x2580',
872
            'dnblock' => '0x2584',
873
            'block' => '0x2588',
874
            'lfblock' => '0x258c',
875
            'rtblock' => '0x2590',
876
            'ltshade' => '0x2591',
877
            'shade' => '0x2592',
878
            'dkshade' => '0x2593',
879
            'filledbox' => '0x25a0',
880
            'H22073' => '0x25a1',
881
            'H18543' => '0x25aa',
882
            'H18551' => '0x25ab',
883
            'filledrect' => '0x25ac',
884
            'triagup' => '0x25b2',
885
            'triagrt' => '0x25ba',
886
            'triagdn' => '0x25bc',
887
            'triaglf' => '0x25c4',
888
            'lozenge' => '0x25ca',
889
            'circle' => '0x25cb',
890
            'H18533' => '0x25cf',
891
            'invbullet' => '0x25d8',
892
            'invcircle' => '0x25d9',
893
            'openbullet' => '0x25e6',
894
            'smileface' => '0x263a',
895
            'invsmileface' => '0x263b',
896
            'sun' => '0x263c',
897
            'female' => '0x2640',
898
            'male' => '0x2642',
899
            'spade' => '0x2660',
900
            'club' => '0x2663',
901
            'heart' => '0x2665',
902
            'diamond' => '0x2666',
903
            'musicalnote' => '0x266a',
904
            'musicalnotedbl' => '0x266b',
905
            'dotlessj' => '0xf6be',
906
            'LL' => '0xf6bf',
907
            'll' => '0xf6c0',
908
            'commaaccent' => '0xf6c3',
909
            'afii10063' => '0xf6c4',
910
            'afii10064' => '0xf6c5',
911
            'afii10192' => '0xf6c6',
912
            'afii10831' => '0xf6c7',
913
            'afii10832' => '0xf6c8',
914
            'Acute' => '0xf6c9',
915
            'Caron' => '0xf6ca',
916
            'Dieresis' => '0xf6cb',
917
            'DieresisAcute' => '0xf6cc',
918
            'DieresisGrave' => '0xf6cd',
919
            'Grave' => '0xf6ce',
920
            'Hungarumlaut' => '0xf6cf',
921
            'Macron' => '0xf6d0',
922
            'cyrBreve' => '0xf6d1',
923
            'cyrFlex' => '0xf6d2',
924
            'dblGrave' => '0xf6d3',
925
            'cyrbreve' => '0xf6d4',
926
            'cyrflex' => '0xf6d5',
927
            'dblgrave' => '0xf6d6',
928
            'dieresisacute' => '0xf6d7',
929
            'dieresisgrave' => '0xf6d8',
930
            'copyrightserif' => '0xf6d9',
931
            'registerserif' => '0xf6da',
932
            'trademarkserif' => '0xf6db',
933
            'onefitted' => '0xf6dc',
934
            'rupiah' => '0xf6dd',
935
            'threequartersemdash' => '0xf6de',
936
            'centinferior' => '0xf6df',
937
            'centsuperior' => '0xf6e0',
938
            'commainferior' => '0xf6e1',
939
            'commasuperior' => '0xf6e2',
940
            'dollarinferior' => '0xf6e3',
941
            'dollarsuperior' => '0xf6e4',
942
            'hypheninferior' => '0xf6e5',
943
            'hyphensuperior' => '0xf6e6',
944
            'periodinferior' => '0xf6e7',
945
            'periodsuperior' => '0xf6e8',
946
            'asuperior' => '0xf6e9',
947
            'bsuperior' => '0xf6ea',
948
            'dsuperior' => '0xf6eb',
949
            'esuperior' => '0xf6ec',
950
            'isuperior' => '0xf6ed',
951
            'lsuperior' => '0xf6ee',
952
            'msuperior' => '0xf6ef',
953
            'osuperior' => '0xf6f0',
954
            'rsuperior' => '0xf6f1',
955
            'ssuperior' => '0xf6f2',
956
            'tsuperior' => '0xf6f3',
957
            'Brevesmall' => '0xf6f4',
958
            'Caronsmall' => '0xf6f5',
959
            'Circumflexsmall' => '0xf6f6',
960
            'Dotaccentsmall' => '0xf6f7',
961
            'Hungarumlautsmall' => '0xf6f8',
962
            'Lslashsmall' => '0xf6f9',
963
            'OEsmall' => '0xf6fa',
964
            'Ogoneksmall' => '0xf6fb',
965
            'Ringsmall' => '0xf6fc',
966
            'Scaronsmall' => '0xf6fd',
967
            'Tildesmall' => '0xf6fe',
968
            'Zcaronsmall' => '0xf6ff',
969
            'exclamsmall' => '0xf721',
970
            'dollaroldstyle' => '0xf724',
971
            'ampersandsmall' => '0xf726',
972
            'zerooldstyle' => '0xf730',
973
            'oneoldstyle' => '0xf731',
974
            'twooldstyle' => '0xf732',
975
            'threeoldstyle' => '0xf733',
976
            'fouroldstyle' => '0xf734',
977
            'fiveoldstyle' => '0xf735',
978
            'sixoldstyle' => '0xf736',
979
            'sevenoldstyle' => '0xf737',
980
            'eightoldstyle' => '0xf738',
981
            'nineoldstyle' => '0xf739',
982
            'questionsmall' => '0xf73f',
983
            'Gravesmall' => '0xf760',
984
            'Asmall' => '0xf761',
985
            'Bsmall' => '0xf762',
986
            'Csmall' => '0xf763',
987
            'Dsmall' => '0xf764',
988
            'Esmall' => '0xf765',
989
            'Fsmall' => '0xf766',
990
            'Gsmall' => '0xf767',
991
            'Hsmall' => '0xf768',
992
            'Ismall' => '0xf769',
993
            'Jsmall' => '0xf76a',
994
            'Ksmall' => '0xf76b',
995
            'Lsmall' => '0xf76c',
996
            'Msmall' => '0xf76d',
997
            'Nsmall' => '0xf76e',
998
            'Osmall' => '0xf76f',
999
            'Psmall' => '0xf770',
1000
            'Qsmall' => '0xf771',
1001
            'Rsmall' => '0xf772',
1002
            'Ssmall' => '0xf773',
1003
            'Tsmall' => '0xf774',
1004
            'Usmall' => '0xf775',
1005
            'Vsmall' => '0xf776',
1006
            'Wsmall' => '0xf777',
1007
            'Xsmall' => '0xf778',
1008
            'Ysmall' => '0xf779',
1009
            'Zsmall' => '0xf77a',
1010
            'exclamdownsmall' => '0xf7a1',
1011
            'centoldstyle' => '0xf7a2',
1012
            'Dieresissmall' => '0xf7a8',
1013
            'Macronsmall' => '0xf7af',
1014
            'Acutesmall' => '0xf7b4',
1015
            'Cedillasmall' => '0xf7b8',
1016
            'questiondownsmall' => '0xf7bf',
1017
            'Agravesmall' => '0xf7e0',
1018
            'Aacutesmall' => '0xf7e1',
1019
            'Acircumflexsmall' => '0xf7e2',
1020
            'Atildesmall' => '0xf7e3',
1021
            'Adieresissmall' => '0xf7e4',
1022
            'Aringsmall' => '0xf7e5',
1023
            'AEsmall' => '0xf7e6',
1024
            'Ccedillasmall' => '0xf7e7',
1025
            'Egravesmall' => '0xf7e8',
1026
            'Eacutesmall' => '0xf7e9',
1027
            'Ecircumflexsmall' => '0xf7ea',
1028
            'Edieresissmall' => '0xf7eb',
1029
            'Igravesmall' => '0xf7ec',
1030
            'Iacutesmall' => '0xf7ed',
1031
            'Icircumflexsmall' => '0xf7ee',
1032
            'Idieresissmall' => '0xf7ef',
1033
            'Ethsmall' => '0xf7f0',
1034
            'Ntildesmall' => '0xf7f1',
1035
            'Ogravesmall' => '0xf7f2',
1036
            'Oacutesmall' => '0xf7f3',
1037
            'Ocircumflexsmall' => '0xf7f4',
1038
            'Otildesmall' => '0xf7f5',
1039
            'Odieresissmall' => '0xf7f6',
1040
            'Oslashsmall' => '0xf7f8',
1041
            'Ugravesmall' => '0xf7f9',
1042
            'Uacutesmall' => '0xf7fa',
1043
            'Ucircumflexsmall' => '0xf7fb',
1044
            'Udieresissmall' => '0xf7fc',
1045
            'Yacutesmall' => '0xf7fd',
1046
            'Thornsmall' => '0xf7fe',
1047
            'Ydieresissmall' => '0xf7ff',
1048
            'radicalex' => '0xf8e5',
1049
            'arrowvertex' => '0xf8e6',
1050
            'arrowhorizex' => '0xf8e7',
1051
            'registersans' => '0xf8e8',
1052
            'copyrightsans' => '0xf8e9',
1053
            'trademarksans' => '0xf8ea',
1054
            'parenlefttp' => '0xf8eb',
1055
            'parenleftex' => '0xf8ec',
1056
            'parenleftbt' => '0xf8ed',
1057
            'bracketlefttp' => '0xf8ee',
1058
            'bracketleftex' => '0xf8ef',
1059
            'bracketleftbt' => '0xf8f0',
1060
            'bracelefttp' => '0xf8f1',
1061
            'braceleftmid' => '0xf8f2',
1062
            'braceleftbt' => '0xf8f3',
1063
            'braceex' => '0xf8f4',
1064
            'integralex' => '0xf8f5',
1065
            'parenrighttp' => '0xf8f6',
1066
            'parenrightex' => '0xf8f7',
1067
            'parenrightbt' => '0xf8f8',
1068
            'bracketrighttp' => '0xf8f9',
1069
            'bracketrightex' => '0xf8fa',
1070
            'bracketrightbt' => '0xf8fb',
1071
            'bracerighttp' => '0xf8fc',
1072
            'bracerightmid' => '0xf8fd',
1073
            'bracerightbt' => '0xf8fe',
1074
            'ff' => '0xfb00',
1075
            'fi' => '0xfb01',
1076
            'fl' => '0xfb02',
1077
            'ffi' => '0xfb03',
1078
            'ffl' => '0xfb04',
1079
            'afii57705' => '0xfb1f',
1080
            'afii57694' => '0xfb2a',
1081
            'afii57695' => '0xfb2b',
1082
            'afii57723' => '0xfb35',
1083
            'afii57700' => '0xfb4b',
1084
        ];
1085
    }
1086
1087 4
    public static function getCodePoint($glyph): ?int
1088
    {
1089 4
        $glyphsMap = static::getGlyphs();
1090
1091 4
        if (isset($glyphsMap[$glyph])) {
1092 1
            return hexdec($glyphsMap[$glyph]);
0 ignored issues
show
Bug Best Practice introduced by
The expression return hexdec($glyphsMap[$glyph]) could return the type double which is incompatible with the type-hinted return integer|null. Consider adding an additional type-check to rule them out.
Loading history...
1093
        }
1094
1095 4
        return null;
1096
    }
1097
}
1098