PDF::Bu...:BdFont(3)

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

okay bestie, welcome to the User Contributed Perl Documentation corner of the internet, pls pull up a chair πŸŽ€


✨ NAME ✨

PDF::Builder::Resource::Font::BdFont β€” the module for using bitmapped Fonts πŸ–ΌοΈ

Also, lowkey important: it inherits from PDF::Builder::Resource::Font πŸ’…


🌸 SYNOPSIS 🌸

#
use PDF::Builder;
#
$pdf = PDF::Builder->new();
$sft = $pdf->bdfont($file);
#

πŸ¦‹ DESCRIPTION πŸ¦‹

So what's the vibe here? This bad boy creates a bitmapped font from a .bdf file β€” that's a bitmap distribution font file, iykyk πŸ“Ό

By default it uses square elements, but you can switch the style to use filled dots instead, which is giving very much dot-matrix printer energy. Either way, the font gets embedded in the PDF file ✨

⚠️ now real talk bestie: bitmapped fonts are quite rough, low resolution, and difficult to read. So unless you're a sadist who wants to force readers back to the good old days of dot-matrix printers and bitmapped X terminals, try to limit the use of such a font to decorative or novelty effects, such as chapter titles and major headings. Have mercy on your readers and use a real font (TrueType, etc.) for body text! πŸ˜­πŸ™

πŸ‘‘ METHODS πŸ‘‘

πŸ’… new

$font = PDF::Builder::Resource::Font::BdFont->new($pdf, $font, %opts)

Returns a BmpFont object 🫢

Valid options (%opts) are:

  • style β€” a value of 'block' (the default) assembles a character from contiguous square blocks ⬛⬛⬛. A value of 'dot' assembles a character from overlapping filled circles, in the style of a dot matrix printer πŸ”΄πŸ”΄πŸ”΄

🌈 AUTHOR 🌈

Alfred Reibenschuh, extensively rewritten by Phil Perry πŸ‘‘


perl v5.42.0 Β· 2026-01-17 β€” that's the source/version + date tea bestie, mwah, go forth and be kind to your readers' eyeballs πŸ’œπŸ§šβ­

πŸ“¦ where this page comes from