Text::PDF::TTFont0(3) User Contributed Perl Documentation Text::PDF::TTFont0(3)

# [NAME](#NAME)

Text::PDF::TTFont0 - Inherits from PDF::Dict and represents a TrueType Type 0 font within a PDF file.

# [DESCRIPTION](#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](#INSTANCE_VARIABLES)

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

# [METHODS](#METHODS)

## [Text::PDF::TTFont-&gt;new($parent, $fontfname. $pdfname)](#Text::PDF::TTFont)

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 throughout a particular PDF file.

All font resources are full PDF objects.

## [out\_text($text)](#out_text%28$text%29)

Returns the string to be put into a content stream for text to be output in this font. The text is assumed to be UTF8 encoded and the return string is a glyph sequence for the text. If subsetting is enabled, then all the glyphs returned are also marked for output.

## [out\_glyphs(@n)](#out_glyphs%28@n%29)

Marks the glyphs as being needed in the output font when subsetting. Returns a string to render the glyphs as specified.

## [width($text)](#width%28$text%29)

Returns the width of the string, assuming it to be UTF8 encoded.

## [outobjdeep($fh, $pdf, %opts)](#outobjdeep%28$fh,_$pdf,__opts%29)

Handles the creation of the font stream including subsetting at this point. So if you get this far, that's it for subsetting.

## [ship\_out($pdf)](#ship_out%28$pdf%29)

Ship this font out to the given $pdf file context

## [empty](#empty)

Empty the font of as much as possible in order to save memory

2026-10-03 perl v5.44.0

---

Document: Text::PDF::TTFont0(3pm) from perl-text-pdf 0.31-r0 (Chainguard OS)
