PDF::Bu...CJKFont(3)

πŸ’– PDF::Builder::Resource::CIDFont::CJKFont πŸ’–

okay bestie, gather round, because this is the manual page for PDF::Builder::Resource::CIDFont::CJKFont β€” it's part of the User Contributed Perl Documentation, and yes, the header is doing that whole abbreviated PDF::Bu...CJKFont(3) thing because apparently even manpages have to be mysterious. πŸ™ˆ


✨ NAME ✨

PDF::Builder::Resource::CIDFont::CJKFont β€” it's the base class for CJK fonts, periodt. πŸ‘‘

It inherits from PDF::Builder::Resource::CIDFont, so all that parent-class energy comes along for the ride. 🫢

ngl bestie, real talk: CJK font support is somewhat obsolete. The move is to skip this whole situation and go directly to using an up-to-date TTF or OTF font, with UTF-8 input, instead. That's the vibe. ✨

🌸 METHODS 🌸

new

$font = PDF::Builder::Resource::CIDFont::CJKFont->new($pdf, $cjkname, %opts)

Returns a cjk-font object. Literally that simple. πŸ’…

Here's the menu of $cjkname values you can order off of:

  • Traditional Chinese: Ming, Ming-Bold, Ming-Italic, Ming-BoldItalic
  • Simplified Chinese: Song, Song-Bold, Song-Italic, Song-BoldItalic
  • Korean: MyungJo, MyungJo-Bold, MyungJo-Italic, MyungJo-BoldItalic
  • Japanese (Mincho): KozMin, KozMin-Bold, KozMin-Italic, KozMin-BoldItalic
  • Japanese (Gothic): KozGo, KozGo-Bold, KozGo-Italic, KozGo-BoldItalic

Defined Options (%opts)

  • encode β€” specify fonts encoding for non-utf8 text. iykyk, if your text isn't utf8, this is the one you reach for. πŸŽ€

glyphByCId

$n = $font->glyphByCId($gid)

Returns a character's glyph name (as a string), given its glyph ID. So you hand it the $gid, it hands you back the glyph name. iconic exchange, no notes. πŸ¦‹


and that's the whole page, bestie, you ate it πŸ’…βœ¨

this lil masterpiece was brought to you by perl v5.42.0, dated 2026-01-17, and the manual page itself is PDF::Bu...CJKFont(3) πŸŽ€πŸ«ΆπŸ’–

πŸ“¦ where this page comes from