Johan Vromans
and 1 contributors

NAME

PostScript::Font::TTtoType42 - Wrap a TrueType font into PostScript Type42

SYNOPSIS

    use PostScript::Font::TTtoType42;
    # Open a TrueType font.
    my $font = PostScript::Font::TTtoType42::->new("Arial.ttf");
    # Write a Type42 font.
    $font->write("Arial.t42");
    # Get the font data (scalar ref).
    my $ptr = $font->as_string;
    # Get the font glyph names (array ref).
    my $gref = $font->glyphnames;

DESCRIPTION

PostScript::Font::TTtoType42 is a subclass of Font::TTF::Font. It knows how to wrap a TrueType font into PostScript Type42 format.

METHODS

new(fontname [ atts ])

Opens the named TrueType font.

as_string

Returns the font data in Type42 format as reference to one single string. Newlines are embedded for readability.

write(t42name)

Writes the font data in Type42 format to the named file.

afm_as_string

Returns the font metrics in AFM format as a reference to a single string. Newlines are embedded for readability.

write_afm(afmname)

Writes the font metrics in AFM format to the named file.

glyphnames

Returns an array reference with the names of all the glyphs of the font, sorted alphabetically.

KNOWN BUGS

Certain TrueType fonts cause problems. If you find one, let me know.

CID fonts are not yet supported.

SEE ALSO

http://partners.adobe.com/asn/developer/PDFS/TN/5012.Type42_Spec.pdf

The specification of the Type 42 font format.

http://fonts.apple.com/TTRefMan/index.html

The True Type reference manual.

http://partners.adobe.com/asn/developer/PDFS/TN/5004.AFM_Spec.pdf

The specification of the Adobe font metrics file format. =back

AUTHOR

Johan Vromans, Squirrel Consultancy <jvromans@squirrel.nl>

COPYRIGHT and DISCLAIMER

This program is Copyright 2002 by Squirrel Consultancy. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of either: a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" which comes with Perl.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the Artistic License for more details.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 670:

You forgot a '=back' before '=head1'