ttfeval - wrapper for short Font::TTF hacks
tteval [options] infont.ttf ...
Work essentially like the same options for Perl. See perlrun.
Indicates that you want an output font written, and names the font file. May take globs or be a directory.
Verbose help.
ttfeval is a wrapper for those one- or two-line font hacks. It does the work of including the Font::TTF module, opening the input font file, and optionally writing the output font file. You just supply the code in the middle. For example, to list out all the glyph names of a font, use:
ttfeval -e 'print join("\n",@{$f->{'post'}->read->{'VAL'}});' myfont.ttf
Like the perl command line, you can specify multiple -e options to build up a multiline program, and you can include additional modules via the -m and -M options.
When the caller-supplied expression is executed, $f holds the result of the Font::TTF::Font->open() function and elements of @ARGV up to and including the input font name have been deleted -- you can use any remaining arguments for your own purposes. $infont and $outfile hold the names of the input and optional output font files -- changing $infont has no effect, but setting or clearing $outfile will change the output.
ttfeval -e 'print $f->{'name'}->read->find_name(4) . "\n"' *.ttf
To install Font::Fret, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Font::Fret
CPAN shell
perl -MCPAN -e shell install Font::Fret
For more information on module installation, please visit the detailed CPAN module installation guide.