(post)
| 1470 | }; |
| 1471 | |
| 1472 | function GlyphNames(post) { |
| 1473 | var i; |
| 1474 | switch (post.version) { |
| 1475 | case 1: |
| 1476 | this.names = exports.standardNames.slice(); |
| 1477 | break; |
| 1478 | case 2: |
| 1479 | this.names = new Array(post.numberOfGlyphs); |
| 1480 | for (i = 0; i < post.numberOfGlyphs; i++) { |
| 1481 | if (post.glyphNameIndex[i] < exports.standardNames.length) { |
| 1482 | this.names[i] = exports.standardNames[post.glyphNameIndex[i]]; |
| 1483 | } else { |
| 1484 | this.names[i] = post.names[post.glyphNameIndex[i] - exports.standardNames.length]; |
| 1485 | } |
| 1486 | } |
| 1487 | |
| 1488 | break; |
| 1489 | case 2.5: |
| 1490 | this.names = new Array(post.numberOfGlyphs); |
| 1491 | for (i = 0; i < post.numberOfGlyphs; i++) { |
| 1492 | this.names[i] = exports.standardNames[i + post.glyphNameIndex[i]]; |
| 1493 | } |
| 1494 | |
| 1495 | break; |
| 1496 | case 3: |
| 1497 | this.names = []; |
| 1498 | break; |
| 1499 | } |
| 1500 | } |
| 1501 | |
| 1502 | GlyphNames.prototype.nameToGlyphIndex = function(name) { |
| 1503 | return this.names.indexOf(name); |
nothing calls this directly
no outgoing calls
no test coverage detected