Skip to content

Fix name extraction for Type3 fonts from pdfs#4960

Merged
jtanx merged 3 commits intofontforge:masterfrom
aidos:fix-incorrect-type3-name-extraction
Mar 22, 2022
Merged

Fix name extraction for Type3 fonts from pdfs#4960
jtanx merged 3 commits intofontforge:masterfrom
aidos:fix-incorrect-type3-name-extraction

Conversation

@aidos
Copy link
Copy Markdown
Contributor

@aidos aidos commented Mar 21, 2022

Fixes a bug when extracting Type3 fonts from PDFs. In the existing code, name is pointed to the correct place in the font dictionary, but pdf_getcharprocs reads the Charprocs dictionary before the name is copied. This causes the later name copy step to read a random section of the CharProcs dict instead. This change copies the name out before loading CharProcs.

Type of change

Bug fix

Comment thread fontforge/parsepdf.c
Comment thread fontforge/parsepdf.c Outdated
@jtanx jtanx merged commit c4e1339 into fontforge:master Mar 22, 2022
@aidos aidos deleted the fix-incorrect-type3-name-extraction branch March 25, 2022 08:45
Omnikron13 pushed a commit to Omnikron13/fontforge that referenced this pull request May 31, 2022
* Fix font name for type3 extraction from pdfs

* free name on failure

* simplify free
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants