(font)
| 1508 | }; |
| 1509 | |
| 1510 | function addGlyphNames(font) { |
| 1511 | var glyph; |
| 1512 | var glyphIndexMap = font.tables.cmap.glyphIndexMap; |
| 1513 | var charCodes = Object.keys(glyphIndexMap); |
| 1514 | |
| 1515 | for (var i = 0; i < charCodes.length; i += 1) { |
| 1516 | var c = charCodes[i]; |
| 1517 | var glyphIndex = glyphIndexMap[c]; |
| 1518 | glyph = font.glyphs.get(glyphIndex); |
| 1519 | glyph.addUnicode(parseInt(c)); |
| 1520 | } |
| 1521 | |
| 1522 | for (i = 0; i < font.glyphs.length; i += 1) { |
| 1523 | glyph = font.glyphs.get(i); |
| 1524 | if (font.cffEncoding) { |
| 1525 | glyph.name = font.cffEncoding.charset[i]; |
| 1526 | } else { |
| 1527 | glyph.name = font.glyphNames.glyphIndexToName(i); |
| 1528 | } |
| 1529 | } |
| 1530 | } |
| 1531 | |
| 1532 | exports.cffStandardStrings = cffStandardStrings; |
| 1533 | exports.cffStandardEncoding = cffStandardEncoding; |
nothing calls this directly
no outgoing calls
no test coverage detected