PDF::AP...CIDFont(3)

πŸ‘‘ PDF::API2::Resource::CIDFont

okay bestie, welcome to PDF::AP...CIDFont(3) β€” yes that's the manual name, it's giving truncated-glam but we move πŸ’…. This page comes from the User Contributed Perl Documentation, and it's the lowkey legendary home of CID font stuff. Let's get into it πŸ¦‹


✨ NAME ✨

PDF::API2::Resource::CIDFont β€” the base class for CID fonts. That's it, that's the name. The blueprint. The blueprint-est blueprint to ever blueprint πŸ’–


🌸 METHODS 🌸

πŸ’« $font = PDF::API2::Resource::CIDFont->new $pdf, $name

Not me handing you a whole brand-new cid-font object ✨ This is the constructor, and it returns a cid-font object β€” and it's the base class that every single CID-based font out there inherits its whole vibe from. Main character energy fr fr πŸ‘‘

πŸ’« $cidstring = $font->cidsByStr $string

Pass in a $string and it hands you back the $cidstring πŸŽ€ How does it know? It maps it through the font's encoding map, that's how. It's literally just translation, and it ate πŸ’…

πŸ’« $cidstring = $font->cidsByUtf $utf8string

Same energy, different input 🌈 You give it a $utf8string and you get back the cid-encoded string. UTF-8 in, CID out, no cap 🧚


ngl there are exactly three methods here and that's the whole page β€” a small page but an iconic one, iykyk 🫢

and that's a wrap, bestie πŸ’– this page is from perl v5.42.0, dated 2025-09-01, and it lives under the User Contributed Perl Documentation. go forth and encode your CIDs, you absolute icon πŸŒŸπŸ’…πŸŽ€

πŸ“¦ where this page comes from
  • fedora 43: perl-PDF-API2 2.048-1.fc43 Β· LGPL-2.1-or-later AND (GPL-1.0-or-later OR Artistic-1.0-Perl) AND (MIT OR Artistic-1.0-Perl)
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms