|
fop 0.90alpha1 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.fonts.apps.TTFReader
A tool which reads TTF files and generates XML font metrics file for use in FOP.
Field Summary | |
protected static org.apache.commons.logging.Log |
log
logging instance |
Constructor Summary | |
TTFReader()
Main constructor. |
Method Summary | |
org.w3c.dom.Document |
constructFontXML(TTFFile ttf,
java.lang.String fontName,
java.lang.String className,
java.lang.String resource,
java.lang.String file,
boolean isCid,
java.lang.String ttcName)
Generates the font metrics file from the TTF/TTC file. |
TTFFile |
loadTTF(java.lang.String fileName,
java.lang.String fontName)
Read a TTF file and returns it as an object. |
static void |
main(java.lang.String[] args)
The main method for the TTFReader tool. |
void |
writeFontXML(org.w3c.dom.Document doc,
java.lang.String target)
Writes the generated DOM Document to a file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.commons.logging.Log log
Constructor Detail |
public TTFReader()
Method Detail |
public static void main(java.lang.String[] args)
args
- Command-line arguments: [options] fontfile.ttf xmlfile.xml
where options can be:
-fn public TTFFile loadTTF(java.lang.String fileName, java.lang.String fontName) throws java.io.IOException
fileName
- The filename of the TTF file.fontName
- The name of the font
java.io.IOException
- In case of an I/O problempublic void writeFontXML(org.w3c.dom.Document doc, java.lang.String target) throws javax.xml.transform.TransformerException
doc
- The DOM Document to save.target
- The target filename for the XML file.
javax.xml.transform.TransformerException
- if an error occurs during serializationpublic org.w3c.dom.Document constructFontXML(TTFFile ttf, java.lang.String fontName, java.lang.String className, java.lang.String resource, java.lang.String file, boolean isCid, java.lang.String ttcName)
ttf
- The PFM file to generate the font metrics from.fontName
- Name of the fontclassName
- Class name for the fontresource
- path to the font as embedded resourcefile
- path to the font as fileisCid
- True if the font is CID encodedttcName
- Name of the TrueType Collection
|
fop 0.90alpha1 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |