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:
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.
size specs are optional.
The directory where to find the files and the specification file. If the class can't find valid data, the
newmethod will return nothing and emit warnings.
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.