Package org.docx4j.fonts.fop.fonts.apps
Class AbstractFontReader
java.lang.Object
org.docx4j.fonts.fop.fonts.apps.AbstractFontReader
Abstract base class for the PFM and TTF Reader command-line applications.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static String[]parseArguments(Map options, String[] args) Parse commandline arguments.voidwriteFontXML(Document doc, File target) Writes the generated DOM Document to a file.voidwriteFontXML(Document doc, String target) Writes the generated DOM Document to a file.
-
Field Details
-
log
protected static final org.slf4j.Logger logLogger instance
-
-
Constructor Details
-
AbstractFontReader
protected AbstractFontReader()Main constructor.
-
-
Method Details
-
parseArguments
Parse commandline arguments. put options in the HashMap and return arguments in the String array the arguments: -fn Perpetua,Bold -cn PerpetuaBold per.ttf Perpetua.xml returns a String[] with the per.ttf and Perpetua.xml. The hash will have the (key, value) pairs: (-fn, Perpetua) and (-cn, PerpetuaBold)- Parameters:
options- Map that will receive optionsargs- the command-line arguments- Returns:
- the arguments
-
writeFontXML
Writes the generated DOM Document to a file.- Parameters:
doc- The DOM Document to save.target- The target filename for the XML file.- Throws:
TransformerException- if an error occurs during serialization
-
writeFontXML
Writes the generated DOM Document to a file.- Parameters:
doc- The DOM Document to save.target- The target file for the XML file.- Throws:
TransformerException- if an error occurs during serialization
-