Skip to content

Commit

Permalink
convert name table _prune_pre_subset to prune_post_subset
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rc1e committed Jun 28, 2023
1 parent edf8891 commit 0a6e8bf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Lib/fontTools/subset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2916,7 +2916,7 @@ def prune_pre_subset(self, font, options):


@_add_method(ttLib.getTableClass("name"))
def prune_pre_subset(self, font, options):
def prune_post_subset(self, font, options):
visitor = NameRecordVisitor()
visitor.visit(font)
nameIDs = set(options.name_IDs) | visitor.seen
Expand Down Expand Up @@ -3442,7 +3442,11 @@ def _subset_glyphs(self, font):
font.setGlyphOrder(self.new_glyph_order)

def _prune_post_subset(self, font):
for tag in font.keys():
tableTags = font.keys()
if "name" in tableTags:
tableTags.remove("name")
tableTags.append("name")
for tag in tableTags:
if tag == "GlyphOrder":
continue
if tag == "OS/2":
Expand Down

0 comments on commit 0a6e8bf

Please sign in to comment.