Skip to content

Commit

Permalink
remove redundant CPAL name removal code
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rc1e committed Jun 28, 2023
1 parent 0a6e8bf commit b563941
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions Lib/fontTools/subset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2586,25 +2586,10 @@ def collect_colors_by_index(paint):

if self.version == 1:
kept_labels = []
dropped_labels = []
for i, label in enumerate(self.paletteEntryLabels):
if i in retained_palette_indices:
kept_labels.append(label)
else:
dropped_labels.append(label)
self.paletteEntryLabels = kept_labels
# Remove dropped labels from the name table.
name_table = font["name"]
name_table.names = [
n
for n in name_table.names
if (
n.nameID not in dropped_labels
# Only remove nameIDs in the user range and if they're not explicitly kept
or n.nameID < 256
or n.nameID in options.name_IDs
)
]
return bool(self.numPaletteEntries)


Expand Down

0 comments on commit b563941

Please sign in to comment.