encoding.go 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. package pdfrender
  2. import (
  3. "strconv"
  4. "strings"
  5. "golang.org/x/text/encoding/charmap"
  6. )
  7. /*
  8. encoding.go
  9. Glyph names and the standard simple font encodings: StandardEncoding,
  10. WinAnsiEncoding, MacRomanEncoding and the built-in Symbol encoding,
  11. the glyph name to Unicode map they need (a subset of the Adobe Glyph
  12. List covering Latin, Greek and the usual symbols), the CFF standard
  13. strings and the Macintosh glyph order used by TrueType 'post' tables.
  14. */
  15. // glyphUnicode lists glyph names with their Unicode value. The first name
  16. // listed for a code point is its preferred name.
  17. var glyphUnicode = []struct {
  18. name string
  19. r rune
  20. }{
  21. {"space", 0x20}, {"exclam", 0x21}, {"quotedbl", 0x22}, {"numbersign", 0x23}, {"dollar", 0x24},
  22. {"percent", 0x25}, {"ampersand", 0x26}, {"quotesingle", 0x27}, {"parenleft", 0x28}, {"parenright", 0x29},
  23. {"asterisk", 0x2A}, {"plus", 0x2B}, {"comma", 0x2C}, {"hyphen", 0x2D}, {"period", 0x2E}, {"slash", 0x2F},
  24. {"zero", 0x30}, {"one", 0x31}, {"two", 0x32}, {"three", 0x33}, {"four", 0x34}, {"five", 0x35},
  25. {"six", 0x36}, {"seven", 0x37}, {"eight", 0x38}, {"nine", 0x39}, {"colon", 0x3A}, {"semicolon", 0x3B},
  26. {"less", 0x3C}, {"equal", 0x3D}, {"greater", 0x3E}, {"question", 0x3F}, {"at", 0x40},
  27. {"bracketleft", 0x5B}, {"backslash", 0x5C}, {"bracketright", 0x5D}, {"asciicircum", 0x5E},
  28. {"underscore", 0x5F}, {"grave", 0x60}, {"braceleft", 0x7B}, {"bar", 0x7C}, {"braceright", 0x7D},
  29. {"asciitilde", 0x7E}, {"nbspace", 0xA0}, {"exclamdown", 0xA1}, {"cent", 0xA2}, {"sterling", 0xA3},
  30. {"currency", 0xA4}, {"yen", 0xA5}, {"brokenbar", 0xA6}, {"section", 0xA7}, {"dieresis", 0xA8},
  31. {"copyright", 0xA9}, {"ordfeminine", 0xAA}, {"guillemotleft", 0xAB}, {"logicalnot", 0xAC},
  32. {"sfthyphen", 0xAD}, {"registered", 0xAE}, {"macron", 0xAF}, {"degree", 0xB0}, {"plusminus", 0xB1},
  33. {"twosuperior", 0xB2}, {"threesuperior", 0xB3}, {"acute", 0xB4}, {"mu", 0xB5}, {"paragraph", 0xB6},
  34. {"periodcentered", 0xB7}, {"cedilla", 0xB8}, {"onesuperior", 0xB9}, {"ordmasculine", 0xBA},
  35. {"guillemotright", 0xBB}, {"onequarter", 0xBC}, {"onehalf", 0xBD}, {"threequarters", 0xBE},
  36. {"questiondown", 0xBF}, {"Agrave", 0xC0}, {"Aacute", 0xC1}, {"Acircumflex", 0xC2}, {"Atilde", 0xC3},
  37. {"Adieresis", 0xC4}, {"Aring", 0xC5}, {"AE", 0xC6}, {"Ccedilla", 0xC7}, {"Egrave", 0xC8},
  38. {"Eacute", 0xC9}, {"Ecircumflex", 0xCA}, {"Edieresis", 0xCB}, {"Igrave", 0xCC}, {"Iacute", 0xCD},
  39. {"Icircumflex", 0xCE}, {"Idieresis", 0xCF}, {"Eth", 0xD0}, {"Ntilde", 0xD1}, {"Ograve", 0xD2},
  40. {"Oacute", 0xD3}, {"Ocircumflex", 0xD4}, {"Otilde", 0xD5}, {"Odieresis", 0xD6}, {"multiply", 0xD7},
  41. {"Oslash", 0xD8}, {"Ugrave", 0xD9}, {"Uacute", 0xDA}, {"Ucircumflex", 0xDB}, {"Udieresis", 0xDC},
  42. {"Yacute", 0xDD}, {"Thorn", 0xDE}, {"germandbls", 0xDF}, {"agrave", 0xE0}, {"aacute", 0xE1},
  43. {"acircumflex", 0xE2}, {"atilde", 0xE3}, {"adieresis", 0xE4}, {"aring", 0xE5}, {"ae", 0xE6},
  44. {"ccedilla", 0xE7}, {"egrave", 0xE8}, {"eacute", 0xE9}, {"ecircumflex", 0xEA}, {"edieresis", 0xEB},
  45. {"igrave", 0xEC}, {"iacute", 0xED}, {"icircumflex", 0xEE}, {"idieresis", 0xEF}, {"eth", 0xF0},
  46. {"ntilde", 0xF1}, {"ograve", 0xF2}, {"oacute", 0xF3}, {"ocircumflex", 0xF4}, {"otilde", 0xF5},
  47. {"odieresis", 0xF6}, {"divide", 0xF7}, {"oslash", 0xF8}, {"ugrave", 0xF9}, {"uacute", 0xFA},
  48. {"ucircumflex", 0xFB}, {"udieresis", 0xFC}, {"yacute", 0xFD}, {"thorn", 0xFE}, {"ydieresis", 0xFF},
  49. {"Abreve", 0x102}, {"abreve", 0x103}, {"Aogonek", 0x104}, {"aogonek", 0x105}, {"Cacute", 0x106},
  50. {"cacute", 0x107}, {"Ccaron", 0x10C}, {"ccaron", 0x10D}, {"Dcaron", 0x10E}, {"dcaron", 0x10F},
  51. {"Dcroat", 0x110}, {"dcroat", 0x111}, {"Eogonek", 0x118}, {"eogonek", 0x119}, {"Ecaron", 0x11A},
  52. {"ecaron", 0x11B}, {"Gbreve", 0x11E}, {"gbreve", 0x11F}, {"Idotaccent", 0x130}, {"dotlessi", 0x131},
  53. {"Lacute", 0x139}, {"lacute", 0x13A}, {"Lcaron", 0x13D}, {"lcaron", 0x13E}, {"Lslash", 0x141},
  54. {"lslash", 0x142}, {"Nacute", 0x143}, {"nacute", 0x144}, {"Ncaron", 0x147}, {"ncaron", 0x148},
  55. {"Ohungarumlaut", 0x150}, {"ohungarumlaut", 0x151}, {"OE", 0x152}, {"oe", 0x153}, {"Racute", 0x154},
  56. {"racute", 0x155}, {"Rcaron", 0x158}, {"rcaron", 0x159}, {"Sacute", 0x15A}, {"sacute", 0x15B},
  57. {"Scedilla", 0x15E}, {"scedilla", 0x15F}, {"Scaron", 0x160}, {"scaron", 0x161}, {"Tcaron", 0x164},
  58. {"tcaron", 0x165}, {"Uring", 0x16E}, {"uring", 0x16F}, {"Uhungarumlaut", 0x170}, {"uhungarumlaut", 0x171},
  59. {"Ydieresis", 0x178}, {"Zacute", 0x179}, {"zacute", 0x17A}, {"Zdotaccent", 0x17B}, {"zdotaccent", 0x17C},
  60. {"Zcaron", 0x17D}, {"zcaron", 0x17E}, {"florin", 0x192}, {"circumflex", 0x2C6}, {"caron", 0x2C7},
  61. {"breve", 0x2D8}, {"dotaccent", 0x2D9}, {"ring", 0x2DA}, {"ogonek", 0x2DB}, {"tilde", 0x2DC},
  62. {"hungarumlaut", 0x2DD}, {"Alpha", 0x391}, {"Beta", 0x392}, {"Gamma", 0x393}, {"Delta", 0x394}, {"Epsilon", 0x395},
  63. {"Zeta", 0x396}, {"Eta", 0x397}, {"Theta", 0x398}, {"Iota", 0x399}, {"Kappa", 0x39A}, {"Lambda", 0x39B},
  64. {"Mu", 0x39C}, {"Nu", 0x39D}, {"Xi", 0x39E}, {"Omicron", 0x39F}, {"Pi", 0x3A0}, {"Rho", 0x3A1},
  65. {"Sigma", 0x3A3}, {"Tau", 0x3A4}, {"Upsilon", 0x3A5}, {"Phi", 0x3A6}, {"Chi", 0x3A7}, {"Psi", 0x3A8},
  66. {"Omega", 0x3A9},
  67. {"alpha", 0x3B1}, {"beta", 0x3B2}, {"gamma", 0x3B3}, {"delta", 0x3B4}, {"epsilon", 0x3B5},
  68. {"zeta", 0x3B6}, {"eta", 0x3B7}, {"theta", 0x3B8}, {"iota", 0x3B9}, {"kappa", 0x3BA}, {"lambda", 0x3BB},
  69. {"nu", 0x3BD}, {"xi", 0x3BE}, {"omicron", 0x3BF}, {"pi", 0x3C0}, {"rho", 0x3C1}, {"sigma1", 0x3C2},
  70. {"sigma", 0x3C3}, {"tau", 0x3C4}, {"upsilon", 0x3C5}, {"phi", 0x3C6}, {"chi", 0x3C7}, {"psi", 0x3C8},
  71. {"omega", 0x3C9}, {"theta1", 0x3D1}, {"Upsilon1", 0x3D2}, {"phi1", 0x3D5}, {"omega1", 0x3D6},
  72. {"endash", 0x2013}, {"emdash", 0x2014}, {"quoteleft", 0x2018}, {"quoteright", 0x2019},
  73. {"quotesinglbase", 0x201A}, {"quotedblleft", 0x201C}, {"quotedblright", 0x201D}, {"quotedblbase", 0x201E},
  74. {"dagger", 0x2020}, {"daggerdbl", 0x2021}, {"bullet", 0x2022}, {"ellipsis", 0x2026},
  75. {"perthousand", 0x2030}, {"minute", 0x2032}, {"second", 0x2033}, {"guilsinglleft", 0x2039},
  76. {"guilsinglright", 0x203A}, {"fraction", 0x2044}, {"Euro", 0x20AC}, {"franc", 0x20A3},
  77. {"trademark", 0x2122}, {"Omega", 0x2126}, {"aleph", 0x2135}, {"arrowleft", 0x2190}, {"arrowup", 0x2191},
  78. {"arrowright", 0x2192}, {"arrowdown", 0x2193}, {"arrowboth", 0x2194}, {"arrowupdn", 0x2195},
  79. {"arrowdblleft", 0x21D0}, {"arrowdblup", 0x21D1}, {"arrowdblright", 0x21D2}, {"arrowdbldown", 0x21D3},
  80. {"arrowdblboth", 0x21D4}, {"universal", 0x2200}, {"partialdiff", 0x2202}, {"existential", 0x2203},
  81. {"emptyset", 0x2205}, {"Delta", 0x2206}, {"gradient", 0x2207}, {"element", 0x2208},
  82. {"notelement", 0x2209}, {"suchthat", 0x220B}, {"product", 0x220F}, {"summation", 0x2211},
  83. {"minus", 0x2212}, {"asteriskmath", 0x2217}, {"radical", 0x221A}, {"proportional", 0x221D},
  84. {"infinity", 0x221E}, {"angle", 0x2220}, {"logicaland", 0x2227}, {"logicalor", 0x2228},
  85. {"intersection", 0x2229}, {"union", 0x222A}, {"integral", 0x222B}, {"therefore", 0x2234},
  86. {"similar", 0x223C}, {"congruent", 0x2245}, {"approxequal", 0x2248}, {"notequal", 0x2260},
  87. {"equivalence", 0x2261}, {"lessequal", 0x2264}, {"greaterequal", 0x2265}, {"propersubset", 0x2282},
  88. {"propersuperset", 0x2283}, {"notsubset", 0x2284}, {"reflexsubset", 0x2286}, {"reflexsuperset", 0x2287},
  89. {"circleplus", 0x2295}, {"circlemultiply", 0x2297}, {"perpendicular", 0x22A5}, {"dotmath", 0x22C5},
  90. {"lozenge", 0x25CA}, {"spade", 0x2660}, {"club", 0x2663}, {"heart", 0x2665}, {"diamond", 0x2666},
  91. {"ff", 0xFB00}, {"fi", 0xFB01}, {"fl", 0xFB02}, {"ffi", 0xFB03}, {"ffl", 0xFB04},
  92. {"nonbreakingspace", 0xA0}, {"middot", 0xB7}, {"overscore", 0xAF}, {"Ohm", 0x2126},
  93. {"apple", 0xF8FF}, {"periodcentered", 0x2219},
  94. }
  95. var (
  96. nameToRune = map[string]rune{}
  97. runeToName = map[rune]string{}
  98. )
  99. func init() {
  100. for c := 'A'; c <= 'Z'; c++ {
  101. nameToRune[string(c)] = c
  102. runeToName[c] = string(c)
  103. }
  104. for c := 'a'; c <= 'z'; c++ {
  105. nameToRune[string(c)] = c
  106. runeToName[c] = string(c)
  107. }
  108. for _, g := range glyphUnicode {
  109. if _, ok := nameToRune[g.name]; !ok {
  110. nameToRune[g.name] = g.r
  111. }
  112. if _, ok := runeToName[g.r]; !ok {
  113. runeToName[g.r] = g.name
  114. }
  115. }
  116. buildEncodings()
  117. }
  118. // glyphNameToRune maps a glyph name to Unicode, including the uniXXXX,
  119. // uXXXX and suffixed (a.sc, f_i) forms
  120. func glyphNameToRune(name string) (rune, bool) {
  121. if r, ok := nameToRune[name]; ok {
  122. return r, true
  123. }
  124. if i := strings.IndexByte(name, '.'); i > 0 {
  125. return glyphNameToRune(name[:i])
  126. }
  127. if strings.HasPrefix(name, "uni") && len(name) >= 7 {
  128. if v, err := strconv.ParseUint(name[3:7], 16, 32); err == nil {
  129. return rune(v), true
  130. }
  131. }
  132. if strings.HasPrefix(name, "u") && len(name) >= 5 && len(name) <= 7 {
  133. if v, err := strconv.ParseUint(name[1:], 16, 32); err == nil && v <= 0x10FFFF {
  134. return rune(v), true
  135. }
  136. }
  137. return 0, false
  138. }
  139. var asciiNames = []string{
  140. "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quotesingle",
  141. "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash",
  142. "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine",
  143. "colon", "semicolon", "less", "equal", "greater", "question", "at",
  144. "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
  145. "U", "V", "W", "X", "Y", "Z",
  146. "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "grave",
  147. "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
  148. "u", "v", "w", "x", "y", "z",
  149. "braceleft", "bar", "braceright", "asciitilde",
  150. }
  151. var (
  152. standardEncoding [256]string
  153. winAnsiEncoding [256]string
  154. macRomanEncoding [256]string
  155. symbolEncoding [256]string
  156. )
  157. func buildEncodings() {
  158. for i, n := range asciiNames {
  159. standardEncoding[32+i] = n
  160. winAnsiEncoding[32+i] = n
  161. macRomanEncoding[32+i] = n
  162. }
  163. standardEncoding[39] = "quoteright"
  164. standardEncoding[96] = "quoteleft"
  165. stdUpper := map[int]string{
  166. 161: "exclamdown", 162: "cent", 163: "sterling", 164: "fraction", 165: "yen", 166: "florin",
  167. 167: "section", 168: "currency", 169: "quotesingle", 170: "quotedblleft", 171: "guillemotleft",
  168. 172: "guilsinglleft", 173: "guilsinglright", 174: "fi", 175: "fl", 177: "endash", 178: "dagger",
  169. 179: "daggerdbl", 180: "periodcentered", 182: "paragraph", 183: "bullet", 184: "quotesinglbase",
  170. 185: "quotedblbase", 186: "quotedblright", 187: "guillemotright", 188: "ellipsis", 189: "perthousand",
  171. 191: "questiondown", 193: "grave", 194: "acute", 195: "circumflex", 196: "tilde", 197: "macron",
  172. 198: "breve", 199: "dotaccent", 200: "dieresis", 202: "ring", 203: "cedilla", 205: "hungarumlaut",
  173. 206: "ogonek", 207: "caron", 208: "emdash", 225: "AE", 227: "ordfeminine", 232: "Lslash",
  174. 233: "Oslash", 234: "OE", 235: "ordmasculine", 241: "ae", 245: "dotlessi", 248: "lslash",
  175. 249: "oslash", 250: "oe", 251: "germandbls",
  176. }
  177. for c, n := range stdUpper {
  178. standardEncoding[c] = n
  179. }
  180. //WinAnsi: the upper half follows code page 1252
  181. dec := charmap.Windows1252
  182. for c := 128; c < 256; c++ {
  183. r := dec.DecodeByte(byte(c))
  184. if n, ok := runeToName[r]; ok && r != 0xFFFD {
  185. winAnsiEncoding[c] = n
  186. } else {
  187. winAnsiEncoding[c] = "bullet"
  188. }
  189. }
  190. winAnsiEncoding[160] = "space"
  191. winAnsiEncoding[173] = "hyphen"
  192. winAnsiEncoding[127] = "bullet"
  193. //MacRoman: the upper half is the Macintosh glyph order from Adieresis
  194. for c := 128; c < 256; c++ {
  195. macRomanEncoding[c] = macGlyphNames[98+c-128]
  196. }
  197. macRomanEncoding[0xCA] = "space"
  198. macRomanEncoding[0xDB] = "currency"
  199. //The Symbol font's built-in encoding: Greek on the Latin letters
  200. greek := "Alpha Beta Chi Delta Epsilon Phi Gamma Eta Iota theta1 Kappa Lambda Mu Nu Omicron Pi Theta Rho Sigma Tau Upsilon sigma1 Omega Xi Psi Zeta"
  201. for i, n := range strings.Fields(greek) {
  202. symbolEncoding['A'+i] = n
  203. symbolEncoding['a'+i] = strings.ToLower(n[:1]) + n[1:]
  204. }
  205. symbolEncoding['J'] = "theta1"
  206. symbolEncoding['j'] = "phi1"
  207. symbolEncoding['V'] = "sigma1"
  208. symbolEncoding['v'] = "omega1"
  209. for c := 32; c < 64; c++ {
  210. symbolEncoding[c] = asciiNames[c-32]
  211. }
  212. symbolEncoding['"'] = "universal"
  213. symbolEncoding['$'] = "existential"
  214. symbolEncoding['\''] = "suchthat"
  215. symbolEncoding['*'] = "asteriskmath"
  216. symbolEncoding['-'] = "minus"
  217. symbolEncoding['@'] = "congruent"
  218. symbolEncoding['\\'] = "therefore"
  219. symbolEncoding['^'] = "perpendicular"
  220. symbolEncoding['_'] = "underscore"
  221. symbolEncoding['['] = "bracketleft"
  222. symbolEncoding[']'] = "bracketright"
  223. symbolEncoding['{'] = "braceleft"
  224. symbolEncoding['|'] = "bar"
  225. symbolEncoding['}'] = "braceright"
  226. symbolEncoding['~'] = "similar"
  227. symUpper := map[int]string{
  228. 0xA1: "Upsilon1", 0xA2: "minute", 0xA3: "lessequal", 0xA4: "fraction", 0xA5: "infinity",
  229. 0xA6: "florin", 0xA7: "club", 0xA8: "diamond", 0xA9: "heart", 0xAA: "spade", 0xAB: "arrowboth",
  230. 0xAC: "arrowleft", 0xAD: "arrowup", 0xAE: "arrowright", 0xAF: "arrowdown", 0xB0: "degree",
  231. 0xB1: "plusminus", 0xB2: "second", 0xB3: "greaterequal", 0xB4: "multiply", 0xB5: "proportional",
  232. 0xB6: "partialdiff", 0xB7: "bullet", 0xB8: "divide", 0xB9: "notequal", 0xBA: "equivalence",
  233. 0xBB: "approxequal", 0xBC: "ellipsis", 0xC0: "aleph", 0xC4: "circlemultiply", 0xC5: "circleplus",
  234. 0xC6: "emptyset", 0xC7: "intersection", 0xC8: "union", 0xC9: "propersuperset", 0xCA: "reflexsuperset",
  235. 0xCB: "notsubset", 0xCC: "propersubset", 0xCD: "reflexsubset", 0xCE: "element", 0xCF: "notelement",
  236. 0xD0: "angle", 0xD1: "gradient", 0xD2: "registered", 0xD3: "copyright", 0xD4: "trademark",
  237. 0xD5: "product", 0xD6: "radical", 0xD7: "dotmath", 0xD8: "logicalnot", 0xD9: "logicaland",
  238. 0xDA: "logicalor", 0xDB: "arrowdblboth", 0xDC: "arrowdblleft", 0xDD: "arrowdblup",
  239. 0xDE: "arrowdblright", 0xDF: "arrowdbldown", 0xE0: "lozenge", 0xE5: "summation", 0xF2: "integral",
  240. }
  241. for c, n := range symUpper {
  242. symbolEncoding[c] = n
  243. }
  244. }
  245. func encodingByName(n Name) *[256]string {
  246. switch n {
  247. case "StandardEncoding":
  248. return &standardEncoding
  249. case "WinAnsiEncoding":
  250. return &winAnsiEncoding
  251. case "MacRomanEncoding":
  252. return &macRomanEncoding
  253. }
  254. return nil
  255. }
  256. // macGlyphNames is the standard Macintosh glyph order (258 names)
  257. var macGlyphNames = strings.Fields(`.notdef .null nonmarkingreturn space exclam quotedbl numbersign
  258. dollar percent ampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash
  259. zero one two three four five six seven eight nine colon semicolon less equal greater question at
  260. A B C D E F G H I J K L M N O P Q R S T U V W X Y Z bracketleft backslash bracketright asciicircum
  261. underscore grave a b c d e f g h i j k l m n o p q r s t u v w x y z braceleft bar braceright
  262. asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis Udieresis aacute agrave acircumflex
  263. adieresis atilde aring ccedilla eacute egrave ecircumflex edieresis iacute igrave icircumflex
  264. idieresis ntilde oacute ograve ocircumflex odieresis otilde uacute ugrave ucircumflex udieresis
  265. dagger degree cent sterling section bullet paragraph germandbls registered copyright trademark
  266. acute dieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu partialdiff
  267. summation product pi integral ordfeminine ordmasculine Omega ae oslash questiondown exclamdown
  268. logicalnot radical florin approxequal Delta guillemotleft guillemotright ellipsis nonbreakingspace
  269. Agrave Atilde Otilde OE oe endash emdash quotedblleft quotedblright quoteleft quoteright divide
  270. lozenge ydieresis Ydieresis fraction currency guilsinglleft guilsinglright fi fl daggerdbl
  271. periodcentered quotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis
  272. Egrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute Ucircumflex
  273. Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla hungarumlaut ogonek caron
  274. Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth eth Yacute yacute Thorn thorn minus
  275. multiply onesuperior twosuperior threesuperior onehalf onequarter threequarters franc Gbreve
  276. gbreve Idotaccent Scedilla scedilla Cacute cacute Ccaron ccaron dcroat`)
  277. // cffStandardStrings are the 391 predefined CFF string IDs
  278. var cffStandardStrings = strings.Fields(`.notdef space exclam quotedbl numbersign dollar percent
  279. ampersand quoteright parenleft parenright asterisk plus comma hyphen period slash zero one two
  280. three four five six seven eight nine colon semicolon less equal greater question at A B C D E F G
  281. H I J K L M N O P Q R S T U V W X Y Z bracketleft backslash bracketright asciicircum underscore
  282. quoteleft a b c d e f g h i j k l m n o p q r s t u v w x y z braceleft bar braceright asciitilde
  283. exclamdown cent sterling fraction yen florin section currency quotesingle quotedblleft
  284. guillemotleft guilsinglleft guilsinglright fi fl endash dagger daggerdbl periodcentered paragraph
  285. bullet quotesinglbase quotedblbase quotedblright guillemotright ellipsis perthousand questiondown
  286. grave acute circumflex tilde macron breve dotaccent dieresis ring cedilla hungarumlaut ogonek
  287. caron emdash AE ordfeminine Lslash Oslash OE ordmasculine ae dotlessi lslash oslash oe germandbls
  288. onesuperior logicalnot mu trademark Eth onehalf plusminus Thorn onequarter divide brokenbar degree
  289. thorn threequarters twosuperior registered minus eth multiply threesuperior copyright Aacute
  290. Acircumflex Adieresis Agrave Aring Atilde Ccedilla Eacute Ecircumflex Edieresis Egrave Iacute
  291. Icircumflex Idieresis Igrave Ntilde Oacute Ocircumflex Odieresis Ograve Otilde Scaron Uacute
  292. Ucircumflex Udieresis Ugrave Yacute Ydieresis Zcaron aacute acircumflex adieresis agrave aring
  293. atilde ccedilla eacute ecircumflex edieresis egrave iacute icircumflex idieresis igrave ntilde
  294. oacute ocircumflex odieresis ograve otilde scaron uacute ucircumflex udieresis ugrave yacute
  295. ydieresis zcaron exclamsmall Hungarumlautsmall dollaroldstyle dollarsuperior ampersandsmall
  296. Acutesmall parenleftsuperior parenrightsuperior twodotenleader onedotenleader zerooldstyle
  297. oneoldstyle twooldstyle threeoldstyle fouroldstyle fiveoldstyle sixoldstyle sevenoldstyle
  298. eightoldstyle nineoldstyle commasuperior threequartersemdash periodsuperior questionsmall
  299. asuperior bsuperior centsuperior dsuperior esuperior isuperior lsuperior msuperior nsuperior
  300. osuperior rsuperior ssuperior tsuperior ff ffi ffl parenleftinferior parenrightinferior
  301. Circumflexsmall hyphensuperior Gravesmall Asmall Bsmall Csmall Dsmall Esmall Fsmall Gsmall Hsmall
  302. Ismall Jsmall Ksmall Lsmall Msmall Nsmall Osmall Psmall Qsmall Rsmall Ssmall Tsmall Usmall Vsmall
  303. Wsmall Xsmall Ysmall Zsmall colonmonetary onefitted rupiah Tildesmall exclamdownsmall
  304. centoldstyle Lslashsmall Scaronsmall Zcaronsmall Dieresissmall Brevesmall Caronsmall
  305. Dotaccentsmall Macronsmall figuredash hypheninferior Ogoneksmall Ringsmall Cedillasmall
  306. questiondownsmall oneeighth threeeighths fiveeighths seveneighths onethird twothirds zerosuperior
  307. foursuperior fivesuperior sixsuperior sevensuperior eightsuperior ninesuperior zeroinferior
  308. oneinferior twoinferior threeinferior fourinferior fiveinferior sixinferior seveninferior
  309. eightinferior nineinferior centinferior dollarinferior periodinferior commainferior Agravesmall
  310. Aacutesmall Acircumflexsmall Atildesmall Adieresissmall Aringsmall AEsmall Ccedillasmall
  311. Egravesmall Eacutesmall Ecircumflexsmall Edieresissmall Igravesmall Iacutesmall Icircumflexsmall
  312. Idieresissmall Ethsmall Ntildesmall Ogravesmall Oacutesmall Ocircumflexsmall Otildesmall
  313. Odieresissmall OEsmall Oslashsmall Ugravesmall Uacutesmall Ucircumflexsmall Udieresissmall
  314. Yacutesmall Thornsmall Ydieresissmall 001.000 001.001 001.002 001.003 Black Bold Book Light
  315. Medium Regular Roman Semibold`)