PDF::Builder
v3.028 Released, 31 December 2025
Please also see the
CPAN listing, the
GitHub entry, and the latest changes list.
I think they just got through marinating the greens.
— Yogi Berra
PDF::Builder::Resource::CIDFont - Base class for CID fonts
Inherits from PDF::Builder::Resource::BaseFont
$font = PDF::Builder::Resource::CIDFont->new($pdf, $name)
Returns a cid-font object, base class for all CID-based fonts.
$n = $font->glyphByCId($gid)
Returns a character's glyph name (string), given its glyph ID.
$u = $font->uniByCId($gid)
Returns a character's Unicode point, given its glyph ID. If no match, return U+0000.
$c = $font->cidByUni($uid)
Returns a glyph ID, given its Unicode point.
$c = $font->cidByEnc($char)
Returns a character's glyph ID, given its encoding (single byte value 0 to 255).
$w = $font->wxByCId($gid)
Returns a character's width, given its glyph ID. Typically this is based on a 1000 unit wide grid.
$w = $font->wxByUni($uid)
Returns a character's width, given its Unicode point. Typically this is based on a 1000 unit wide grid.
$w = $font->wxByEnc($enc)
Returns a character's width, given its encoding (a single byte character in the range 0 to 255). Typically this is based on a 1000 unit wide grid.
$w = $font->width($string)
Returns a string's width. This is typically based on a 1000 wide grid for each glyph.
$w = $font->width_cid($gid)
Returns a character's width, given its glyph ID. This is typically based on a 1000 wide grid for a glyph.
$cidstring = $font->cidsByStr($string)
Returns the cid-string (as a single text string, not an array) from string, based on the font's encoding map.
$cidstring = $font->cidsByUtf($utf8string)
Returns the CID-encoded string (a text string, not an array) from utf8-string.
$cid_string = $font->textByStr($text)
Returns a cid text string, given a text string.
$cid_string = $font->textByStrKern($text, $size, $indent)
Returns a cid string, given character text, size, and indentation.
$stream_str = $font->text($text, $size, $indent)
Returns a PDF text stream-ready code block to output the given text.
$stream_str = $font->text_cid($text, $size)
Returns a PDF text stream-ready output using glyph IDs, given input text and size.
$font->text_cid_kern($text, $size, $indent)
Returns a PDF output-ready stream command using glyph IDs, given text, size, and indentation.
$font = $font->encodeByName($enc)
Returns updated $font object, given an input encoding.
$g_or_w = $font->glyphNum()
If 'glyphs' table is defined for a font, return its size; otherwise, return the 'wx' widths table size.
Master Index
PDF::Builder -- Facilitates the creation and modification of PDF files
PDF::Builder::Resource -- Base class for PDF resources
PDF::Builder::Resource::BaseFont -- Base class for font resources
PDF::Builder::Resource::ColorSpace -- Base class for PDF color spaces
PDF::Builder::Resource::Colors -- Translate color names into RGB settings
PDF::Builder::Resource::ExtGState -- Graphics state dictionary support
PDF::Builder::Resource::Font -- Some common support routines for font files
PDF::Builder::Resource::Glyphs -- Preparsed uniglyph.txt file information
PDF::Builder::Resource::PaperSizes -- List of standard paper sizes and their dimensions
PDF::Builder::Resource::Pattern -- Support stub for fill patterns
PDF::Builder::Resource::Shading -- Support stub for fill shading patterns
PDF::Builder::Resource::UniFont -- Unicode Font Support
PDF::Builder::Resource::XObject -- Base class for external objects
PDF::Builder::Resource::CIDFont::CJKFont -- Base class for CJK fonts
PDF::Builder::Resource::CIDFont::TrueType -- TrueType (ttfont) font support
All content © copyright 2005 – 2026
by Catskill Technology Services, LLC.
All rights reserved.
Note that Third Party software (whether Open Source or proprietary) on this
site remains under the copyright and license of its owners.
Catskill Technology Services, LLC does not claim copyright over such software.
This page is https://www.catskilltech.com/Documentation/PDF/Builder/Resource/CIDFont.html
Search Quotations database.
Last updated Thu, 01 Jan 2026 at 7:49 PM