.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "PDF::Builder::Resource::CIDFont 3" .TH PDF::Builder::Resource::CIDFont 3 2026-02-08 "perl v5.42.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME PDF::Builder::Resource::CIDFont \- Base class for CID fonts .PP Inherits from PDF::Builder::Resource::BaseFont .SH METHODS .IX Header "METHODS" .SS new .IX Subsection "new" .Vb 1 \& $font = PDF::Builder::Resource::CIDFont\->new($pdf, $name) .Ve .Sp .RS 4 Returns a cid\-font object, base class for all CID\-based fonts. .RE .SS glyphByCId .IX Subsection "glyphByCId" .Vb 1 \& $n = $font\->glyphByCId($gid) .Ve .Sp .RS 4 Returns a character\*(Aqs glyph name (string), given its glyph ID. .RE .SS uniByCId .IX Subsection "uniByCId" .Vb 1 \& $u = $font\->uniByCId($gid) .Ve .Sp .RS 4 Returns a character\*(Aqs Unicode point, given its glyph ID. If no match, return U+0000. .RE .SS cidByUni .IX Subsection "cidByUni" .Vb 1 \& $c = $font\->cidByUni($uid) .Ve .Sp .RS 4 Returns a glyph ID, given its Unicode point. .RE .SS cidByEnc .IX Subsection "cidByEnc" .Vb 1 \& $c = $font\->cidByEnc($char) .Ve .Sp .RS 4 Returns a character\*(Aqs glyph ID, given its encoding (single byte value 0 to 255). .RE .SS wxByCId .IX Subsection "wxByCId" .Vb 1 \& $w = $font\->wxByCId($gid) .Ve .Sp .RS 4 Returns a character\*(Aqs width, given its glyph ID. Typically this is based on a 1000 unit wide grid. .RE .SS wxByUni .IX Subsection "wxByUni" .Vb 1 \& $w = $font\->wxByUni($uid) .Ve .Sp .RS 4 Returns a character\*(Aqs width, given its Unicode point. Typically this is based on a 1000 unit wide grid. .RE .SS wxByEnc .IX Subsection "wxByEnc" .Vb 1 \& $w = $font\->wxByEnc($enc) .Ve .Sp .RS 4 Returns a character\*(Aqs width, given its encoding (a single byte character in the range 0 to 255). Typically this is based on a 1000 unit wide grid. .RE .SS width .IX Subsection "width" .Vb 1 \& $w = $font\->width($string) .Ve .Sp .RS 4 Returns a string\*(Aqs width. This is typically based on a 1000 wide grid for each glyph. .RE .SS width_cid .IX Subsection "width_cid" .Vb 1 \& $w = $font\->width_cid($gid) .Ve .Sp .RS 4 Returns a character\*(Aqs width, given its glyph ID. This is typically based on a 1000 wide grid for a glyph. .RE .SS cidsByStr .IX Subsection "cidsByStr" .Vb 1 \& $cidstring = $font\->cidsByStr($string) .Ve .Sp .RS 4 Returns the cid\-string (as a single text string, not an array) from string, based on the font\*(Aqs encoding map. .RE .SS cidsByUtf .IX Subsection "cidsByUtf" .Vb 1 \& $cidstring = $font\->cidsByUtf($utf8string) .Ve .Sp .RS 4 Returns the CID\-encoded string (a text string, not an array) from utf8\-string. .RE .SS textByStr .IX Subsection "textByStr" .Vb 1 \& $cid_string = $font\->textByStr($text) .Ve .Sp .RS 4 Returns a cid text string, given a text string. .RE .SS textByStrKern .IX Subsection "textByStrKern" .Vb 1 \& $cid_string = $font\->textByStrKern($text, $size, $indent) .Ve .Sp .RS 4 Returns a cid string, given character text, size, and indentation. .RE .SS text .IX Subsection "text" .Vb 1 \& $stream_str = $font\->text($text, $size, $indent) .Ve .Sp .RS 4 Returns a PDF text stream\-ready code block to output the given text. .RE .SS text_cid .IX Subsection "text_cid" .Vb 1 \& $stream_str = $font\->text_cid($text, $size) .Ve .Sp .RS 4 Returns a PDF text stream\-ready output using glyph IDs, given input text and size. .RE .SS text_cid_kern .IX Subsection "text_cid_kern" .Vb 1 \& $font\->text_cid_kern($text, $size, $indent) .Ve .Sp .RS 4 Returns a PDF output\-ready stream command using glyph IDs, given text, size, and indentation. .RE .SS encodeByName .IX Subsection "encodeByName" .Vb 1 \& $font = $font\->encodeByName($enc) .Ve .Sp .RS 4 Returns updated \f(CW$font\fR object, given an input encoding. .RE .SS glyphNum .IX Subsection "glyphNum" .Vb 1 \& $g_or_w = $font\->glyphNum() .Ve .Sp .RS 4 If \*(Aqglyphs\*(Aq table is defined for a font, return its size; otherwise, return the \*(Aqwx\*(Aq widths table size. .RE