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

Skip to content

Commit cdbb556

Browse files
committed
Drop metadata table when subsetting fonts
This table contains a list of design/supported languages, which it doesn't make sense to keep in a subset. Fixes #24025
1 parent 39cdf5d commit cdbb556

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)