PDF::AP...rueType(3)
β¨ NAME β¨
PDF::API2::Resource::CIDFont::TrueType β it's giving TrueType font support π¦π
okay so real talk, this is the little guy you call when you want your PDF to speak TrueType. it's a resource class under the whole PDF::API2 empire, and it handles CID fonts that are TrueType based. slay. periodt. π
π METHODS π
π« new β the main character constructor π«
$font = PDF::API2::Resource::CIDFont::TrueType->new $pdf, $file, %options
bestie. this is the call. you hand it a $pdf (your PDF object, the whole vibe) and a $file (the TrueType font file you're obsessed with), sprinkle in some %options if you're feeling spicy, and boom β it hands you back a font object π«Άβ¨
literally that's it. returns a font object. no notes.
πΈ Defined Options πΈ
the options you can pass, iykyk:
-encodeβ specify fonts encoding for non-utf8 text. π so like, if your text is not UTF-8 (we're living in the past a lil bit, and that's okay), this is where you tell it which encoding to use. no cap.-nosubsetβ disables subsetting. π«π‘ so by default it subsets (only embeds the glyphs you actually use, very demure, very mindful, very file-size-conscious π), and this flag says "no thanks, embed the whole thing." iconic choice, bigger file, you do you.
π reminder bestie: those two options are the only defined ones here. don't go inventing new ones and blaming me when they don't do anything π
and that's the whole page, fr fr. this one's from the User Contributed Perl Documentation crew, running on perl v5.42.0, dated 2025-09-01 β so like, shoutout to the Perl 5.42.0 girlies and the September 1st 2025 timestamp, you ate ππ mwah, go embed some fonts π§π
β
π¦ 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