Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e9c85ed

Browse files
authored
Merge pull request #26019 from meeseeksmachine/auto-backport-of-pr-25985-on-v3.7.x
Backport PR #25985 on branch v3.7.x (Drop metadata table when subsetting fonts)
2 parents 6f878a8 + fe9ba20 commit e9c85ed

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/matplotlib/backends/_backend_pdf_ps.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,13 @@ def get_glyphs_subset(fontfile, characters):
3636

3737
options = subset.Options(glyph_names=True, recommended_glyphs=True)
3838

39-
# prevent subsetting FontForge Timestamp and other tables
40-
options.drop_tables += ['FFTM', 'PfEd', 'BDF']
39+
# Prevent subsetting extra tables.
40+
options.drop_tables += [
41+
'FFTM', # FontForge Timestamp.
42+
'PfEd', # FontForge personal table.
43+
'BDF', # X11 BDF header.
44+
'meta', # Metadata stores design/supported languages (meaningless for subsets).
45+
]
4146

4247
# if fontfile is a ttc, specify font number
4348
if fontfile.endswith(".ttc"):

0 commit comments

Comments
 (0)