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
- fedora 44: perl-PDF-Builder 3.028-2.fc44 Β· LGPL-2.1-or-later AND LGPL-2.1-only AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms