Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify actual font name in PDF #56

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

austinbutler
Copy link
Contributor

Description of the change

Uses the font's name as the name of the embedded font instead of the currently hard-coded courier.

Benefits

More clear what font is actually embedded in the PDF. Visually I was pretty sure it was Courier Prime, but the name of the font in the PDF data was just "courier" so I thought maybe it was not finding the right font.

Before:

❯ pdffonts ~/scripts/test.pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
courier                              CID TrueType      Identity-H       yes no  yes      9  0
courier                              CID TrueType      Identity-H       yes no  yes     14  0
courier                              CID TrueType      Identity-H       yes no  yes     19  0
courier                              CID TrueType      Identity-H       yes no  yes     24  0

After:

❯ pdffonts ~/scripts/test.pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
Courier+Prime                        CID TrueType      Identity-H       yes no  yes      9  0
Courier+Prime                        CID TrueType      Identity-H       yes no  yes     14  0
Courier+Prime                        CID TrueType      Identity-H       yes no  yes     19  0
Courier+Prime                        CID TrueType      Identity-H       yes no  yes     24  0

Possible drawbacks

Only thing I could think of is if there's some weird character issue with the name of some fonts.

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.

1 participant