PDF::Bu...:UniFont(3)

πŸ’– PDF::Builder::Resource::UniFont β€” Unicode Font Support πŸ’–

okay bestie, welcome to UniFont, the part of PDF::Builder that handles Unicode font support. this is the PDF::Builder::Resource::UniFont page, and yeah the title got squished into PDF::Bu...:UniFont(3) because the man page formatter has no chill, but you're in the right place 🫢


✨ METHODS ✨

🌸 new

$font = PDF::Builder::Resource::UniFont->new($pdf, @fontspecs, %opts)

returns a uni-font object. that's it, that's the job πŸ’…

FONTSPECS: fonts get registered with a hash-ref that looks like this:

{
    font   => $fontobj,     # the font to be registered
    blocks => $blockspec,   # the unicode blocks the font is being registered for
    codes  => $codespec,    # the unicode codepoints, -"-
}

BLOCKSPECS:

[
     $block1, $block3,    # register font for block 1 + 3
    [$blockA, $blockZ],   # register font for blocks A .. Z
]

CODESPECS:

[
     $cp1, $cp3,          # register font for codepoint 1 + 3
    [$cpA, $cpZ],         # register font for codepoints A .. Z
]
NOTE: if you wanna register a font for the entire unicode space (ie. U+0000 .. U+FFFF), then literally just hand over a font-object, no hash-ref, no drama. so easy, so slay ✨

πŸŽ€ Valid options (%opts)

  • encode β€” changes the encoding of the font away from its default. for a list of valid tags go peek at "perldoc Encode" πŸ‘€

πŸ¦‹ isvirtual

$flag = $font->isvirtual()

(No Information)

not me getting a whole method with (No Information)... iconic mystery behaviour fr fr πŸ™ˆ

⭐ fontlist

$font->fontlist()

(No Information)

πŸ’œ width

$w = $font->width($string)

(No Information)

🌈 text

$font->text($string, $size, $indent)

(No Information)


and that's the whole page, bestie! no cap, every option and every (No Information) preserved because we do not skip details around here πŸ‘‘

this absolute gem was documented as perl v5.42.0, dated 2026-01-17, and it lives in the User Contributed Perl Documentation collection as PDF::Bu...:UniFont(3) β€” mwah, go forth and register those fonts πŸ’…πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from