Skip to content

Commit 553f2a0

Browse files
committed
[size] refactor / simplify approach to table tags in get_table_tags method
1 parent 15512ce commit 553f2a0

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/fontsize/size.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,4 @@ def _calc_table_sizes(self):
3737
self.tables[table] = self.ttfont.reader.tables[table].length
3838

3939
def get_table_tags(self):
40-
if self.ttfont.reader:
41-
return list(self.ttfont.reader.keys())
42-
else:
43-
table_tags = list(self.ttfont.tables.keys())
44-
if "GlyphOrder" in table_tags:
45-
table_tags.remove("GlyphOrder")
46-
return table_tags
40+
return [tag for tag in self.ttfont.keys() if tag != "GlyphOrder"]

0 commit comments

Comments
 (0)