Package org.apache.fop.fonts.apps
Class AbstractFontReader
- java.lang.Object
-
- org.apache.fop.fonts.apps.AbstractFontReader
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.LoglogLogger instance
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractFontReader()Main constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static voiddetermineLogLevel(java.util.Map options)Determines the log level based of the options from the command-line.protected static java.lang.String[]parseArguments(java.util.Map options, java.lang.String[] args)Parse commandline arguments.protected static voidsetLogLevel(java.lang.String level)Sets the logging level.voidwriteFontXML(org.w3c.dom.Document doc, java.io.File target)Writes the generated DOM Document to a file.voidwriteFontXML(org.w3c.dom.Document doc, java.lang.String target)Writes the generated DOM Document to a file.
-
-
-
Method Detail
-
parseArguments
protected static java.lang.String[] parseArguments(java.util.Map options, java.lang.String[] args)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
-
setLogLevel
protected static void setLogLevel(java.lang.String level)
Sets the logging level.- Parameters:
level- the logging level ("debug", "info", "error" etc., see Jakarta Commons Logging)
-
determineLogLevel
protected static void determineLogLevel(java.util.Map options)
Determines the log level based of the options from the command-line.- Parameters:
options- the command-line options
-
writeFontXML
public void writeFontXML(org.w3c.dom.Document doc, java.lang.String target) throws javax.xml.transform.TransformerExceptionWrites the generated DOM Document to a file.- Parameters:
doc- The DOM Document to save.target- The target filename for the XML file.- Throws:
javax.xml.transform.TransformerException- if an error occurs during serialization
-
writeFontXML
public void writeFontXML(org.w3c.dom.Document doc, java.io.File target) throws javax.xml.transform.TransformerExceptionWrites the generated DOM Document to a file.- Parameters:
doc- The DOM Document to save.target- The target file for the XML file.- Throws:
javax.xml.transform.TransformerException- if an error occurs during serialization
-
-