Skip to content

Commit

Permalink
Temporary fix for corrupted characters
Browse files Browse the repository at this point in the history
Fixes Issue #3374, by falling back on the deprecated in-python fonttools
based technique for doing subsetting.  To be removed once the new
MuPDF-based code is a little more mature, or at least once [1, 2] are
fixed.

[1] pymupdf/PyMuPDF#3470
[2] pymupdf/PyMuPDF#3494
  • Loading branch information
cbm755 committed May 18, 2024
1 parent 7df20e6 commit d573304
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plom/create/mergeAndCodePages.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,9 @@ def make_PDF(
# Subsetting requires https://pypi.org/project/fonttools
# Note: In theory, this could muck around with fonts from the source
# (i.e., if they were NOT subsetted). Does not happen with LaTeX.
exam.subset_fonts()
# TODO: consider doing this only when *we* placed non-ascii (Issue #3381)
# TODO: remove this fallback on a future PyMuPDF (see Issue #3374)
exam.subset_fonts(fallback=True)

# Add the deflate option to compress the embedded pngs
# see https://pymupdf.readthedocs.io/en/latest/document/#Document.save
Expand Down

0 comments on commit d573304

Please sign in to comment.