PDF::API3::Compat::API2::Resource::BaseFont(3)

$font = PDF::API3::Compat::API2::Resource::BaseFont->new $pdf, $name
    Returns a font resource object.

$font = PDF::API3::Compat::API2::Resource::BaseFont->new_api $api, $name
    Returns a font resource object. This method is different from 'new' that it needs an PDF::API3::Compat::API2-object rather than a Text::PDF::File-object.

$descriptor = $font->descrByData()
    Returns the fonts FontDescriptor key-structure based on the fonts data.

FONT-MANAGEMENT RELATED METHODS

$name = $font->fontname()
    Returns the fonts name (aka. display-name).

$name = $font->altname()
    Returns the fonts alternative-name (aka. windows-name for a postscript font).

$name = $font->subname()
    Returns the fonts subname (aka. font-variant, schriftschnitt).

$name = $font->apiname()
    Returns the fonts name to be used internally (should be equal to $font->name).

$issymbol = $font->issymbol()
    Returns the fonts symbol flag.

$iscff = $font->iscff()
    Returns the fonts compact-font-format flag.

TYPOGRAPHY RELATED METHODS

($llx, $lly, $urx, $ury) = $font->fontbbox()
    Returns the fonts bounding-box.

$capheight = $font->capheight()
    Returns the fonts capheight value.

$xheight = $font->xheight()
    Returns the fonts xheight value.

$missingwidth = $font->missingwidth()
    Returns the fonts missingwidth value.

$maxwidth = $font->maxwidth()
    Returns the fonts maxwidth value.

$avgwidth = $font->avgwidth()
    Returns the fonts avgwidth value.

$flags = $font->flags()
    Returns the fonts flags value.

$stemv = $font->stemv()
    Returns the fonts stemv value.

$stemh = $font->stemh()
    Returns the fonts stemh value.

$italicangle = $font->italicangle()
    Returns the fonts italicangle value.

$isfixedpitch = $font->isfixedpitch()
    Returns the fonts isfixedpitch flag.

$underlineposition = $font->underlineposition()
    Returns the fonts underlineposition value.

$underlinethickness = $font->underlinethickness()
    Returns the fonts underlinethickness value.

$ascender = $font->ascender()
    Returns the fonts ascender value.

$descender = $font->descender()
    Returns the fonts descender value.

GLYPH RELATED METHODS

@names = $font->glyphNames()
    Returns the defined glyph-names of the font.

$glNum = $font->glyphNum()
    Returns the number of defined glyph-names of the font.

$uni = $font->uniByGlyph $char
    Returns the unicode by glyph-name.

$uni = $font->uniByEnc $char
    Returns the unicode by the fonts encoding map.

$uni = $font->uniByMap $char
    Returns the unicode by the fonts default map.

$char = $font->encByGlyph $glyph
    Returns the character by the given glyph-name of the fonts encoding map.

$char = $font->encByUni $uni
    Returns the character by the given unicode of the fonts encoding map.

$char = $font->mapByGlyph $glyph
    Returns the character by the given glyph-name of the fonts default map.

$char = $font->mapByUni $uni
    Returns the character by the given unicode of the fonts default map.

$name = $font->glyphByUni $unicode
    Returns the glyphs name by the fonts unicode map. BEWARE: non-standard glyph-names are mapped onto the ms-symbol area (0xF000).

$name = $font->glyphByEnc $char
    Returns the glyphs name by the fonts encoding map.

$name = $font->glyphByMap $char
    Returns the glyphs name by the fonts default map.

$width = $font->wxByGlyph $glyph
    Returns the glyphs width.

$width = $font->wxByUni $uni
    Returns the unicodes width.

$width = $font->wxByEnc $char
    Returns the characters width based on the current encoding.

$width = $font->wxByMap $char
    Returns the characters width based on the fonts default encoding.

$wd = $font->width $text
    Returns the width of $text as if it were at size 1. BEWARE: works only correctly if a proper perl-string is used either in native or utf8 format (check utf8-flag).

@widths = $font->width_array $text
    Returns the widths of the words in $text as if they were at size 1.

STRING METHODS

$utf8string = $font->utfByStr $string
    Returns the utf8-string from string based on the fonts encoding map.

$string = $font->strByUtf $utf8string
    Returns the encoded string from utf8-string based on the fonts encoding map.

$pdfstring = $font->textByStr $text
    Returns a properly formatted representation of $text for use in the PDF.

AUTHOR
alfred reibenschuh.

HISTORY
    $Log: BaseFont.pm,v $
    Revision 2.9  2007/10/16 20:08:19  areibens
    changed undef safeguards for wx* methods

    Revision 2.8  2007/10/10 06:18:15  areibens
    fixed noisy undef handling of isvirtual

    Revision 2.7  2007/04/07 10:25:46  areibens
    fixed fix for wxByGlyph not honoring cidfont width arrays

    Revision 2.6  2007/04/07 09:51:16  areibens
    fix for wxByGlyph not honoring cidfont width arrays

    Revision 2.5  2007/01/04 16:33:20  areibens
    fix acro 8 fix

    Revision 2.4  2007/01/04 16:02:28  areibens
    applied untested fix for acrobat 8 "<ident> TJ" bug

    Revision 2.3  2006/08/14 18:11:47  areibens
    fixed wxByGlyph

    Revision 2.2  2006/06/14 16:57:52  areibens
    fixed ToUnicode cmap greneration to use actual encoden rather than the default

    Revision 2.1  2006/06/14 16:53:00  areibens
    fixed unicode lookup to use actual encoding rather than default

    Revision 2.0  2005/11/16 02:16:04  areibens
    revision workaround for SF cvs import not to screw up CPAN

    Revision 1.2  2005/11/16 01:27:48  areibens
    genesis2

    Revision 1.1  2005/11/16 01:19:25  areibens
    genesis

    Revision 1.18  2005/10/19 19:06:27  fredo
    added handling of kerning

    Revision 1.17  2005/06/17 19:44:03  fredo
    fixed CPAN modulefile versioning (again)

    Revision 1.16  2005/06/17 18:53:34  fredo
    fixed CPAN modulefile versioning (dislikes cvs)

    Revision 1.15  2005/03/14 22:01:06  fredo
    upd 2005

    Revision 1.14  2005/01/21 10:03:09  fredo
    added object saver for cmap

    Revision 1.13  2004/12/16 00:30:53  fredo
    added no warn for recursion

    Revision 1.12  2004/11/24 20:10:55  fredo
    added virtual font handling

    Revision 1.11  2004/11/22 02:05:32  fredo
    added pdf-1.5 font param specs

    Revision 1.10  2004/10/26 14:41:37  fredo
    added panose identification style entry

    Revision 1.9  2004/10/17 03:55:00  fredo
    simplified ToUnicode associated CMap for single-byte fonts

    Revision 1.8  2004/10/17 03:47:36  fredo
    fixed inclusion of ToUnicode compatible key and associated CMap

    Revision 1.7  2004/06/15 09:14:41  fredo
    removed cr+lf

    Revision 1.6  2004/06/07 19:44:36  fredo
    cleaned out cr+lf for lf

    Revision 1.5  2004/04/20 09:47:34  fredo
    fixed unicode to font-encoding-vector conversion

    Revision 1.4  2003/12/08 13:05:32  Administrator
    corrected to proper licencing statement

    Revision 1.3  2003/11/30 17:28:54  Administrator
    merged into default

    Revision 1.2.2.1  2003/11/30 16:56:35  Administrator
    merged into default

    Revision 1.2  2003/11/30 11:44:49  Administrator
    added CVS id/log

POD ERRORS
Hey! The above document had some coding errors, which are explained below:

Around line 54:
    '=item' outside of any '=over'