@@ -45,6 +45,71 @@ const cffStandardStrings = [
4545 'Uacutesmall' , 'Ucircumflexsmall' , 'Udieresissmall' , 'Yacutesmall' , 'Thornsmall' , 'Ydieresissmall' , '001.000' ,
4646 '001.001' , '001.002' , '001.003' , 'Black' , 'Bold' , 'Book' , 'Light' , 'Medium' , 'Regular' , 'Roman' , 'Semibold' ] ;
4747
48+ // Strings below index 392 are standard CFF strings and are not encoded in the font.
49+
50+ const cffISOAdobeStrings = [
51+ '.notdef' , 'space' , 'exclam' , 'quotedbl' , 'numbersign' , 'dollar' , 'percent' , 'ampersand' , 'quoteright' ,
52+ 'parenleft' , 'parenright' , 'asterisk' , 'plus' , 'comma' , 'hyphen' , 'period' , 'slash' , 'zero' , 'one' , 'two' ,
53+ 'three' , 'four' , 'five' , 'six' , 'seven' , 'eight' , 'nine' , 'colon' , 'semicolon' , 'less' , 'equal' , 'greater' ,
54+ 'question' , 'at' , 'A' , 'B' , 'C' , 'D' , 'E' , 'F' , 'G' , 'H' , 'I' , 'J' , 'K' , 'L' , 'M' , 'N' , 'O' , 'P' , 'Q' , 'R' , 'S' ,
55+ 'T' , 'U' , 'V' , 'W' , 'X' , 'Y' , 'Z' , 'bracketleft' , 'backslash' , 'bracketright' , 'asciicircum' , 'underscore' ,
56+ 'quoteleft' , 'a' , 'b' , 'c' , 'd' , 'e' , 'f' , 'g' , 'h' , 'i' , 'j' , 'k' , 'l' , 'm' , 'n' , 'o' , 'p' , 'q' , 'r' , 's' , 't' ,
57+ 'u' , 'v' , 'w' , 'x' , 'y' , 'z' , 'braceleft' , 'bar' , 'braceright' , 'asciitilde' , 'exclamdown' , 'cent' , 'sterling' ,
58+ 'fraction' , 'yen' , 'florin' , 'section' , 'currency' , 'quotesingle' , 'quotedblleft' , 'guillemotleft' , 'guilsinglleft' ,
59+ 'guilsinglright' , 'fi' , 'fl' , 'endash' , 'dagger' , 'daggerdbl' , 'periodcentered' , 'paragraph' , 'bullet' ,
60+ 'quotesinglbase' , 'quotedblbase' , 'quotedblright' , 'guillemotright' , 'ellipsis' , 'perthousand' , 'questiondown' ,
61+ 'grave' , 'acute' , 'circumflex' , 'tilde' , 'macron' , 'breve' , 'dotaccent' , 'dieresis' , 'ring' , 'cedilla' ,
62+ 'hungarumlaut' , 'ogonek' , 'caron' , 'emdash' , 'AE' , 'ordfeminine' , 'Lslash' , 'Oslash' , 'OE' , 'ordmasculine' , 'ae' ,
63+ 'dotlessi' , 'lslash' , 'oslash' , 'oe' , 'germandbls' , 'onesuperior' , 'logicalnot' , 'mu' , 'trademark' , 'Eth' ,
64+ 'onehalf' , 'plusminus' , 'Thorn' , 'onequarter' , 'divide' , 'brokenbar' , 'degree' , 'thorn' , 'threequarters' ,
65+ 'twosuperior' , 'registered' , 'minus' , 'eth' , 'multiply' , 'threesuperior' , 'copyright' , 'Aacute' , 'Acircumflex' ,
66+ 'Adieresis' , 'Agrave' , 'Aring' , 'Atilde' , 'Ccedilla' , 'Eacute' , 'Ecircumflex' , 'Edieresis' , 'Egrave' , 'Iacute' ,
67+ 'Icircumflex' , 'Idieresis' , 'Igrave' , 'Ntilde' , 'Oacute' , 'Ocircumflex' , 'Odieresis' , 'Ograve' , 'Otilde' , 'Scaron' ,
68+ 'Uacute' , 'Ucircumflex' , 'Udieresis' , 'Ugrave' , 'Yacute' , 'Ydieresis' , 'Zcaron' , 'aacute' , 'acircumflex' ,
69+ 'adieresis' , 'agrave' , 'aring' , 'atilde' , 'ccedilla' , 'eacute' , 'ecircumflex' , 'edieresis' , 'egrave' , 'iacute' ,
70+ 'icircumflex' , 'idieresis' , 'igrave' , 'ntilde' , 'oacute' , 'ocircumflex' , 'odieresis' , 'ograve' , 'otilde' , 'scaron' ,
71+ 'uacute' , 'ucircumflex' , 'udieresis' , 'ugrave' , 'yacute' , 'ydieresis' , 'zcaron' ] ;
72+
73+ const cffIExpertStrings = [
74+ '.notdef' , 'space' , 'exclamsmall' , 'Hungarumlautsmall' , 'dollaroldstyle' , 'dollarsuperior' , 'ampersandsmall' ,
75+ 'Acutesmall' , 'parenleftsuperior' , 'parenrightsuperior' , 'twodotenleader' , 'onedotenleader' , 'comma' , 'hyphen' ,
76+ 'period' , 'fraction' , 'zerooldstyle' , 'oneoldstyle' , 'twooldstyle' , 'threeoldstyle' , 'fouroldstyle' , 'fiveoldstyle' ,
77+ 'sixoldstyle' , 'sevenoldstyle' , 'eightoldstyle' , 'nineoldstyle' , 'colon' , 'semicolon' , 'commasuperior' ,
78+ 'threequartersemdash' , 'periodsuperior' , 'questionsmall' , 'asuperior' , 'bsuperior' , 'centsuperior' , 'dsuperior' ,
79+ 'esuperior' , 'isuperior' , 'lsuperior' , 'msuperior' , 'nsuperior' , 'osuperior' , 'rsuperior' , 'ssuperior' , 'tsuperior' ,
80+ 'ff' , 'fi' , 'fl' , 'ffi' , 'ffl' , 'parenleftinferior' , 'parenrightinferior' , 'Circumflexsmall' , 'hyphensuperior' ,
81+ 'Gravesmall' , 'Asmall' , 'Bsmall' , 'Csmall' , 'Dsmall' , 'Esmall' , 'Fsmall' , 'Gsmall' , 'Hsmall' , 'Ismall' , 'Jsmall' ,
82+ 'Ksmall' , 'Lsmall' , 'Msmall' , 'Nsmall' , 'Osmall' , 'Psmall' , 'Qsmall' , 'Rsmall' , 'Ssmall' , 'Tsmall' , 'Usmall' ,
83+ 'Vsmall' , 'Wsmall' , 'Xsmall' , 'Ysmall' , 'Zsmall' , 'colonmonetary' , 'onefitted' , 'rupiah' , 'Tildesmall' ,
84+ 'exclamdownsmall' , 'centoldstyle' , 'Lslashsmall' , 'Scaronsmall' , 'Zcaronsmall' , 'Dieresissmall' , 'Brevesmall' ,
85+ 'Caronsmall' , 'Dotaccentsmall' , 'Macronsmall' , 'figuredash' , 'hypheninferior' , 'Ogoneksmall' , 'Ringsmall' ,
86+ 'Cedillasmall' , 'onequarter' , 'onehalf' , 'threequarters' , 'questiondownsmall' , 'oneeighth' , 'threeeighths' ,
87+ 'fiveeighths' , 'seveneighths' , 'onethird' , 'twothirds' , 'zerosuperior' , 'onesuperior' , 'twosuperior' , 'threesuperior' ,
88+ 'foursuperior' , 'fivesuperior' , 'sixsuperior' , 'sevensuperior' , 'eightsuperior' , 'ninesuperior' , 'zeroinferior' ,
89+ 'oneinferior' , 'twoinferior' , 'threeinferior' , 'fourinferior' , 'fiveinferior' , 'sixinferior' , 'seveninferior' ,
90+ 'eightinferior' , 'nineinferior' , 'centinferior' , 'dollarinferior' , 'periodinferior' , 'commainferior' , 'Agravesmall' ,
91+ 'Aacutesmall' , 'Acircumflexsmall' , 'Atildesmall' , 'Adieresissmall' , 'Aringsmall' , 'AEsmall' , 'Ccedillasmall' ,
92+ 'Egravesmall' , 'Eacutesmall' , 'Ecircumflexsmall' , 'Edieresissmall' , 'Igravesmall' , 'Iacutesmall' , 'Icircumflexsmall' ,
93+ 'Idieresissmall' , 'Ethsmall' , 'Ntildesmall' , 'Ogravesmall' , 'Oacutesmall' , 'Ocircumflexsmall' , 'Otildesmall' ,
94+ 'Odieresissmall' , 'OEsmall' , 'Oslashsmall' , 'Ugravesmall' , 'Uacutesmall' , 'Ucircumflexsmall' , 'Udieresissmall' ,
95+ 'Yacutesmall' , 'Thornsmall' , 'Ydieresissmall'
96+ ] ;
97+
98+ const cffExpertSubsetStrings = [
99+ '.notdef' , 'space' , 'dollaroldstyle' , 'dollarsuperior' , 'parenleftsuperior' , 'parenrightsuperior' , 'twodotenleader' ,
100+ 'onedotenleader' , 'comma' , 'hyphen' , 'period' , 'fraction' , 'zerooldstyle' , 'oneoldstyle' , 'twooldstyle' ,
101+ 'threeoldstyle' , 'fouroldstyle' , 'fiveoldstyle' , 'sixoldstyle' , 'sevenoldstyle' , 'eightoldstyle' , 'nineoldstyle' ,
102+ 'colon' , 'semicolon' , 'commasuperior' , 'threequartersemdash' , 'periodsuperior' , 'asuperior' , 'bsuperior' ,
103+ 'centsuperior' , 'dsuperior' , 'esuperior' , 'isuperior' , 'lsuperior' , 'msuperior' , 'nsuperior' , 'osuperior' ,
104+ 'rsuperior' , 'ssuperior' , 'tsuperior' , 'ff' , 'fi' , 'fl' , 'ffi' , 'ffl' , 'parenleftinferior' , 'parenrightinferior' ,
105+ 'hyphensuperior' , 'colonmonetary' , 'onefitted' , 'rupiah' , 'centoldstyle' , 'figuredash' , 'hypheninferior' ,
106+ 'onequarter' , 'onehalf' , 'threequarters' , 'oneeighth' , 'threeeighths' , 'fiveeighths' , 'seveneighths' , 'onethird' ,
107+ 'twothirds' , 'zerosuperior' , 'onesuperior' , 'twosuperior' , 'threesuperior' , 'foursuperior' , 'fivesuperior' ,
108+ 'sixsuperior' , 'sevensuperior' , 'eightsuperior' , 'ninesuperior' , 'zeroinferior' , 'oneinferior' , 'twoinferior' ,
109+ 'threeinferior' , 'fourinferior' , 'fiveinferior' , 'sixinferior' , 'seveninferior' , 'eightinferior' , 'nineinferior' ,
110+ 'centinferior' , 'dollarinferior' , 'periodinferior' , 'commainferior'
111+ ] ;
112+
48113const cffStandardEncoding = [
49114 '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' , '' ,
50115 '' , '' , '' , '' , 'space' , 'exclam' , 'quotedbl' , 'numbersign' , 'dollar' , 'percent' , 'ampersand' , 'quoteright' ,
@@ -258,11 +323,7 @@ function addGlyphNamesAll(font) {
258323 for ( let i = 0 ; i < font . glyphs . length ; i += 1 ) {
259324 glyph = font . glyphs . get ( i ) ;
260325 if ( font . cffEncoding ) {
261- if ( font . isCIDFont ) {
262- glyph . name = 'gid' + i ;
263- } else {
264- glyph . name = font . cffEncoding . charset [ i ] ;
265- }
326+ glyph . name = font . cffEncoding . charset [ i ] ;
266327 } else if ( font . glyphNames . names ) {
267328 glyph . name = font . glyphNames . glyphIndexToName ( i ) ;
268329 }
@@ -303,6 +364,9 @@ function addGlyphNames(font, opt) {
303364
304365export {
305366 cffStandardStrings ,
367+ cffISOAdobeStrings ,
368+ cffIExpertStrings ,
369+ cffExpertSubsetStrings ,
306370 cffStandardEncoding ,
307371 cffExpertEncoding ,
308372 standardNames ,
0 commit comments