org.apache.fop.fonts.apps
Class PFMReader
A tool which reads PFM files from Adobe Type 1 fonts and creates
XML font metrics file for use in FOP.
Document | constructFontXML(PFMFile pfm, String fontName, String className, String resource, String file) - Generates the font metrics file from the PFM file.
|
PFMFile | loadPFM(String filename) - Read a PFM file and returns it as an object.
|
static void | main(String[] args) - The main method for the PFM reader tool.
|
void | preview(PFMFile pfm) - Displays a preview of the PFM file on the console.
|
PFMReader
public PFMReader()
Main constructor.
constructFontXML
public Document constructFontXML(PFMFile pfm,
String fontName,
String className,
String resource,
String file)
Generates the font metrics file from the PFM file.
pfm
- 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 file
- The DOM document representing the font metrics file.
loadPFM
public PFMFile loadPFM(String filename)
throws IOException
Read a PFM file and returns it as an object.
filename
- The filename of the PFM file.
main
public static void main(String[] args)
The main method for the PFM reader tool.
args
- Command-line arguments: [options] metricfile.pfm xmlfile.xml
where options can be:
-fn
default is to use the fontname in the .pfm file, but you can override
that name to make sure that the embedded font is used instead of installed
fonts when viewing documents with Acrobat Reader.
-cn
default is to use the fontname
-ef
will add the possibility to embed the font. When running fop, fop will look
for this file to embed it
-er
you can also include the fontfile in the fop.jar file when building fop.
You can use both -ef and -er. The file specified in -ef will be searched first,
then the -er file.
preview
public void preview(PFMFile pfm)
Displays a preview of the PFM file on the console.
pfm
- The PFM file to preview.
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.