Drop the name table when subsetting a truetype font into a pdf file

This commit is contained in:
Kovid Goyal 2012-12-21 12:20:51 +05:30
parent 8352098513
commit 8a6f1b11ba

View File

@ -83,7 +83,7 @@ def do_warn(warnings, *args):
def pdf_subset(sfnt, glyphs): def pdf_subset(sfnt, glyphs):
for tag in tuple(sfnt.tables): for tag in tuple(sfnt.tables):
if tag not in {b'hhea', b'head', b'hmtx', b'maxp', b'name', if tag not in {b'hhea', b'head', b'hmtx', b'maxp',
b'OS/2', b'post', b'cvt', b'fpgm', b'glyf', b'loca', b'OS/2', b'post', b'cvt', b'fpgm', b'glyf', b'loca',
b'prep', b'CFF ', b'VORG'}: b'prep', b'CFF ', b'VORG'}:
# Remove non core tables since they are unused in PDF rendering # Remove non core tables since they are unused in PDF rendering