Removes nameID 16 and 17 for the Macintosh entry. This makes MS Word much happier to exchange documents cross version and platform. *font* is a fontTools font object
(font)
| 608 | |
| 609 | |
| 610 | def nameTableTweak(font): |
| 611 | """ |
| 612 | Removes nameID 16 and 17 for the Macintosh entry. This makes MS Word |
| 613 | much happier to exchange documents cross version and platform. |
| 614 | |
| 615 | *font* is a fontTools font object |
| 616 | """ |
| 617 | |
| 618 | nameIDs = [(16, 1, 0, 0), (17, 1, 0, 0)] |
| 619 | nameTable = font["name"] |
| 620 | |
| 621 | for n in nameIDs: |
| 622 | nameRecord = nameTable.getName(n[0], n[1], n[2], n[3]) |
| 623 | if nameRecord is not None: |
| 624 | nameTable.names.remove(nameRecord) |
| 625 | |
| 626 | |
| 627 | def makeDSIG(font): |