PDF::F...::Font(3pm)

πŸ“¦
version 0.34 Β· 2 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

✨ 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 a FONT tag, you're gonna get a PDFLib error the moment the first TEXTBOX tries 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 a FONT tag if a TEXTBOX tag exists, but only after the non-standard behavior of FONT gets fixed. q.v. the NOTE below. 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