Skip to content

Commit

Permalink
Ignoring metadata table in fonts - suppressing a useless warning - fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas-C authored Jul 6, 2023
1 parent d2b6e51 commit 432165d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions fpdf/image_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

RESAMPLE = Resampling.LANCZOS
except ImportError: # For Pillow < 9.1.0
# pylint: disable=no-member
RESAMPLE = Image.ANTIALIAS
except ImportError:
Image = None
Expand Down
3 changes: 2 additions & 1 deletion fpdf/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ def _add_fonts(self):
# notdef_outline=True means that keeps the white box for the .notdef glyph
# recommended_glyphs=True means that adds the .notdef, .null, CR, and space glyphs
options = ftsubset.Options(notdef_outline=True, recommended_glyphs=True)
# dropping the tables previous dropped in the old ttfonts.py file #issue 418
# dropping some tables that currently not used:
options.drop_tables += [
"FFTM", # FontForge Timestamp table - cf. https://github.com/PyFPDF/fpdf2/issues/600
"GDEF", # Glyph Definition table = various glyph properties used in OpenType layout processing
Expand All @@ -582,6 +582,7 @@ def _add_fonts(self):
"MATH", # Mathematical typesetting table = specific information necessary for math formula layout
"hdmx", # Horizontal Device Metrics table, stores integer advance widths scaled to particular pixel sizes
# for OpenType™ fonts with TrueType outlines
"meta", # metadata table
]
subsetter = ftsubset.Subsetter(options)
subsetter.populate(glyphs=glyph_names)
Expand Down

0 comments on commit 432165d

Please sign in to comment.