Skip to content

Instantly share code, notes, and snippets.

@stefanschmidt
Created June 10, 2023 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanschmidt/d062a3575a3e52e1f138563121f455f7 to your computer and use it in GitHub Desktop.
Save stefanschmidt/d062a3575a3e52e1f138563121f455f7 to your computer and use it in GitHub Desktop.
Extract embedded fonts from a PDF file as OpenType file
# show information about pdf resources (shows font names used in PDF)
mutool info file.pdf
# extract font and image resources
mutool extract file.pdf
# convert a CFF file (Compact Font Format) to OTF format (OpenType Font)
fontforge -lang=ff -c 'Open($1); Generate($1:r + ".otf")' font.cff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment