From 9d29eb0caed159fa63a58c2a0400a3f60d019521 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Wed, 21 Dec 2005 22:13:06 +0000 Subject: [PATCH] Updated the classpath for PFMReader and TTFReader. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_91@358397 13f79535-47bb-0310-9956-ffa450edef68 --- .../content/xdocs/trunk/fonts.xml | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/documentation/content/xdocs/trunk/fonts.xml b/src/documentation/content/xdocs/trunk/fonts.xml index ba5be8ed3..993fa047e 100644 --- a/src/documentation/content/xdocs/trunk/fonts.xml +++ b/src/documentation/content/xdocs/trunk/fonts.xml @@ -135,13 +135,19 @@ More information about fonts can be found at:

Type 1 Font Metrics

FOP includes PFMReader, which reads the PFM file that normally comes with a Type 1 font, and generates an appropriate font metrics file for it. To use it, run the class org.apache.fop.fonts.apps.PFMReader:

-

Windows:

- java -cp build\fop.jar;lib\avalon-framework.jar;lib\xml-apis.jar; - lib\xercesImpl.jar;lib\xalan.jar +

Windows (on JDK 1.4 and later):

+ java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file -

Unix:

- java -cp build/fop.jar:lib/avalon-framework.jar:lib/xml-apis.jar: - lib/xercesImpl.jar:lib/xalan.jar +

Windows (on JDK 1.3.x):

+ java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar;lib\xml-apis.jar; + lib\xercesImpl.jar;lib\xalan.jar;lib\serializer.jar + org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file +

Unix (on JDK 1.4 and later):

+ java -cp build/fop.jar:lib/avalon-framework.jar:lib/commons-logging.jar:lib/commons-io.jar + org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file +

Unix (on JDK 1.3.1):

+ java -cp build/fop.jar:lib/avalon-framework.jar:lib/commons-logging.jar:lib/commons-io.jar:lib/xml-apis.jar: + lib/xercesImpl.jar:lib/xalan.jar:lib/serializer.jar org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file

PFMReader [options]:

The classpath in the above example has been simplified for readability. You will have to adjust the classpath to the names of the actual JAR files in the lib directory. -avalon-framework.jar is necessary only for versions 0.20.5 or later. -xml-apis.jar, xercesImpl.jar and xalan.jar are not necessary for JDK version 1.4 or later. +xml-apis.jar, xercesImpl.jar, xalan.jar and serializer.jar are not necessary for JDK version 1.4 or later. The tool will construct some values (FontBBox, StemV and ItalicAngle) based on assumptions and calculations which are only an approximation to the real values. FontBBox and Italic Angle can be found in the human-readable part of the PFB file or in the AFM file. The PFMReader tool does not yet interpret PFB or AFM files, so if you want to be correct, you may have to adjust the values in the XML file manually. @@ -165,8 +170,7 @@ The constructed values however appear to have no visible influence.

FOP includes TTFReader, which reads the TTF file and generates an appropriate font metrics file for it. Use it in a similar manner to PFMReader. For example, to create such a metrics file in Windows from the TrueType font at c:\myfonts\cmr10.ttf:

- java -cp build\fop.jar;lib\avalon-framework.jar;lib\xml-apis.jar; - lib\xercesImpl.jar;lib\xalan.jar + java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar org.apache.fop.fonts.apps.TTFReader [options] C:\myfonts\cmr10.ttf ttfcm.xml

TTFReader [options]:

@@ -222,8 +226,7 @@ To create metrics files for these fonts, you must specify which font in the coll

To get a list of the fonts in a collection, just start the TTFReader as if it were a normal TrueType file (without the -ttcname option). It will display all of the font names and exit with an Exception.

Here is an example of generating a metrics file for a .ttc file:

- java -cp build\fop.jar;lib\avalon-framework.jar;lib\xml-apis.jar; - lib\xercesImpl.jar;lib\xalan.jar + java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar org.apache.fop.fonts.apps.TTFReader -ttcname "MS Mincho" msmincho.ttc msminch.xml -- 2.39.5