PDF::Bu...tscript(3)

πŸ’– PDF::Builder::Resource::Font::Postscript πŸ’–

okay bestie, so this is a section 3 page (that's a Perl module, for the uninitiated) from the User Contributed Perl Documentation collection β€” and it's literally the support-routines situation for using PostScript (Type 1) fonts. yes. fonts. the good ones. πŸŽ€

It inherits from PDF::Builder::Resource::Font, so everything cute in there? yeah, she got it too. πŸ’…


✨ NAME ✨

PDF::Builder::Resource::Font::Postscript β€” support routines for using PostScript (Type 1) fonts. that's the whole vibe. πŸ¦‹

It inherits from PDF::Builder::Resource::Font.


🌸 METHODS 🌸

🫢 new

PDF::Builder::Resource::Font::Postscript->new($pdf, $psfile, %opts)

not me creating an object for a PostScript font 😭 β€” this is the constructor, and it handles ASCII (.pfa), binary (.pfb), and T1 (.t1) font files, plus ASCII (.afm) and binary (.pfm) metrics files. like, she does it all, no cap.

See "PS Fonts" in PDF::Builder::Docs for additional information. πŸ“š

The valid %opts are, and yes I'm listing every single one:

  • encode β€” changes the encoding of the font from its default. heads up bestie: it's the encoding that shows up in a PDF object (record), not the entire font's glyph list β€” it lists the 256 glyphs associated with this encoding (and that are available in this font). so like, 256 glyphs, that's the whole roster. πŸ‘‘
  • afmfile β€” specifies the location of the ASCII font metrics file (.afm). it may be used with either an ASCII (.pfa) or binary (.pfb) glyph file. πŸ“

afm_file is still accepted as an (older) alternative to afmfile. (legacy queen, we respect her πŸ™ˆ)

  • pfmfile β€” specifies the location of the binary font metrics file (.pfm). it may be used with either an ASCII (.pfa) or binary (.pfb) glyph file. πŸ’œ

pfm_file is still accepted as an (older) alternative to pfmfile. (again, iconic elder, still valid ✨)

  • pdfname β€” changes the reference-name of the font from its default. that reference-name is normally generated automatically, and you can grab it via $pdfname=$font->name(). so if you ever lose her, that's how you find her again πŸ₯Ή
  • dokern β€” enables kerning if data is available. spacing that actually understands itself, periodt. πŸ’…

kerning is still accepted as an (older) alternative to dokern. (say it with me: backwards compatible, always 🌈)

fr fr, that's every option β€” nothing skipped, nothing invented. if it's here, it's in the original. 🫑

and that's the whole page, bestie!! πŸ’– this was PDF::Builder::Resource::Font::Postscript, section 3, from the User Contributed Perl Documentation β€” shipped with perl v5.42.0, dated 2026-01-17. go forth and kern responsibly. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from