PDF::F...::Font(3pm)
β¨ PDF::F...::Font β the vibe β¨
okay bestie, so this is PDF::F...::Font(3pm) from the User Contributed Perl Documentation, and it's basically the little container that tells your PDF like, what font to wear. π
It lives inside PDF::FromHTML::Template and it's giving very specific, very niche, very iconic.
π NAME
PDF::FromHTML::Template::Container::Font β it specifies the font used for TEXTBOX nodes. that's it, that's the job. π
πΈ NODE NAME
FONT
like, when you write it in your template, that's what you call it. lowercase, cute, font. β¨
π¦ INHERITANCE
PDF::FromHTML::Template::Container
so it inherits from the Container class, as it should. family tree stays intact. π
π ATTRIBUTES
FACEβ this one is required, no skipping it bestie. it has to be a legal font face that PDFLib actually recognizes. (go check the PDFLib docs, q.v. for more details β they said it, not me)Hβ the point size of the font. like, how big is the lettering. that's the whole thing. π
π§ CHILDREN
None. zero. no kids, no dependents, this container is childless and thriving. π
π AFFECTS
The font used when rendering a TEXTBOX. that's the impact. main character behavior only. β¨
β DEPENDENCIES
None. fully independent, no baggage, we love that for her. π«Ά
π USAGE
<font face="Times-Roman" h="8">
... Children will be rendered in 8-point TimesRoman font ...
</font>
so like, everything inside those tags gets rendered in 8-point TimesRoman. slay.
β οΈ real talk though: if you don't specify aFONTtag, you're gonna get a PDFLib error the moment the firstTEXTBOXtries to render. that's a whole mess. π
and here's the thing β PDF::FromHTML::Template does not require a FONT tag, because not every PDF document even involves text. so like, it's not gonna force you. but also:
(they might require aFONTtag if aTEXTBOXtag exists, but only after the non-standard behavior ofFONTgets fixed. q.v. theNOTEbelow. so like, watch this space, i guess. π)
π NOTE
okay so for backwards compatibility, a stand-alone FONT tag gets treated as if it's the parent for all nodes until the end of the parent node. which isβ¦ a choice. π
π¨ this behavior is deprecated and will be removed in a future release. so don't get attached, bestie.
<pagedef>
... Children here aren't affected by the FONT tag below ...
<font face="Times-Roman" h="8"/>
... Children here _ARE_ affected by the FONT tag above ...
</pagedef>
see how the first batch is untouched and the second batch gets dragged into the font situation? yeah. that's the legacy vibe. it's giving β¨ haunted β¨.
π AUTHOR
Rob Kinyon (rkinyon@columbus.rr.com)
shoutout to Rob, no cap. π«Ά
π¦ SEE ALSO
nothing listed here, bestie. it's just vibes and silence. πΈ
and that's the whole page!! this was perl v5.38.2, dated 2024-07-28, and the page itself is PDF::F...::Font(3pm) β thanks for reading, ily, go specify your FACE before your TEXTBOX blows up π
β¨π
π¦ where this page comes from
- debian trixie: libpdf-fromhtml-perl 0.34-1 Β· CC0-1.0
- ubuntu resolute: libpdf-fromhtml-perl 0.34-1 Β· CC0-1.0
- ubuntu stonking: libpdf-fromhtml-perl 0.34-1 Β· CC0-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms