## PDF::API2::TTFont

Subclassed from PDF::API2::PDF::TTFont0 and PDF::API2::Font.

$font = PDF::API2::TTFont->new $pdf,$ttffile,$pdfname

Returns a truetype font object (called from $pdf->ttfont).

$pdfstring = $font->text_ucs2 $text

Returns a properly formated string-representation of $text for use in the PDF but requires $text to be in UCS2.

$pdfstring = $font->text_utf8 $text

Returns a properly formated string-representation of $text for use in the PDF but requires $text to be in UTF8.

$pdfstring = $font->text $text

Returns a properly formated string-representation of $text for use in the PDF.

$wd = $font->width $text

Returns the width of $text as if it were at size 1.

@widths = $font->width_array $text

Returns the widths of the words in $text as if they were at size 1.

$wd = $font->width_ucs2 $text

Returns the width of $text as if it were at size 1, but requires $text to be in UCS2.

$wd = $font->width_utf8 $text

Returns the width of $text as if it were at size 1, but requires $text to be in UTF8.

($llx,$lly,$urx,$ury) = $font->bbox $text

Returns the texts bounding-box as if it were at size 1.

($llx,$lly,$urx,$ury) = $font->bbox_ucs2 $ucs2text

Returns the texts bounding-box as if it were at size 1.

($llx,$lly,$urx,$ury) = $font->bbox_utf8 $utf8text

Returns the texts bounding-box as if it were at size 1.

$font->encode $encoding

Changes the encoding of the font object. Since encodings are one virtual in ::API2 for truetype fonts you DONT have to use 'clone'.

# AUTHOR

alfred reibenschuh