Text::Amuse::Compile::Webfonts - Class to parse and validate webfonts for Text::Amuse::Compile
This class only takes a single parameter, with the directory where to find the fonts. Anyway, the content of the directory is very specific.
The class expects to find 4 fonts, a regular, an italic, a bold and a bold italic one. Given that the names are arbitrary, we need an hint. For this you have to provide a file, in the very same directory, with the specifications. The file must be named spec.txt and need the following content:
spec.txt
E.g., for Droid fonts:
family Droid Serif regular DroidSerif-Regular.ttf italic DroidSerif-Italic.ttf bold DroidSerif-Bold.ttf bolditalic DroidSerif-Bold.ttf size 10
The four TTF files must be placed in this directory as well. The formats supported are TTF, OTF and WOFF.
The family and size specs are optional.
family
size
The directory where to find the files and the specification file. If the class can't find valid data, the new method will return nothing and emit warnings.
new
Every accessor here is read only.
The absolute path to the fonts.
The filename of the regular font.
The filename of the bold font.
The filename of the italic font.
The filename of the bolditalic font.
The family name.
The mimetype of the fonts.
The size of the fonts in pt to be used on display.
The format to feed the src description in the CSS.
Return an hash with where the keys are the filenames without the path, and the value the full absolute path to the files.
To install Text::Amuse::Compile, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Amuse::Compile
CPAN shell
perl -MCPAN -e shell install Text::Amuse::Compile
For more information on module installation, please visit the detailed CPAN module installation guide.