The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Text::PDF::TTFont - Inherits from Text::PDF::Dict and represents a TrueType font within a PDF file.

DESCRIPTION

A font consists of two primary parts in a PDF file: the header and the font descriptor. Whilst two fonts may share font descriptors, they will have their own header dictionaries including encoding and widhth information.

INSTANCE VARIABLES

There are no instance variables beyond the variables which directly correspond to entries in the appropriate PDF dictionaries.

METHODS

Text::PDF::TTFont->new($parent, $fontfname. $pdfname)

Creates a new font resource for the given fontfile. This includes the font descriptor and the font stream. The $pdfname is the name by which this font resource will be known throught a particular PDF file.

All font resources are full PDF objects.

$t->add_glyphs($font, $first, \@glyphs)

This function allows you to add glyphs to a PDF font based on glyphs in the TrueType font. $first contains the 8-bit codepoint of the first glyph. The rest of the glyphs follow on sequentially.

It is possible to add sets of glyphs in different calls to this function, but it is strongly recommended that they be added in monotonic, non-overlapping order. The function will trim the incoming list if it overlaps the existing list, which cannot contain gaps.

$f->copy

Copies the font object excluding the name, widths and encoding, etc.

TITLE

Text::PDF::TTIOString - internal IO type handle for string output for font embedding. This code is ripped out of IO::Scalar, to save the direct dependence for so little. See IO::Scalar for details