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.
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:
After:
Possible drawbacks
Only thing I could think of is if there's some weird character issue with the name of some fonts.