You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2002/12/02 20:31:00 UTC

cvs commit: xml-fop/src/documentation/content/xdocs fonts.xml

jeremias    2002/12/02 11:31:00

  Modified:    src/documentation/content/xdocs fonts.xml
  Log:
  Correct classpaths
  Improve text structure
  Some notes
  
  Revision  Changes    Path
  1.3       +76 -52    xml-fop/src/documentation/content/xdocs/fonts.xml
  
  Index: fonts.xml
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/fonts.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- fonts.xml	19 Nov 2002 07:57:27 -0000	1.2
  +++ fonts.xml	2 Dec 2002 19:31:00 -0000	1.3
  @@ -6,23 +6,21 @@
     <header>
       <title>Fonts</title>
       <authors>
  -      <person name="Jeremias Maerki" email=""/>
  +      <person name="Jeremias Märki" email=""/>
         <person name="Tore Engvig" email=""/>
        </authors>
     </header>
   <body>
  -<section>
  -  <title>Font Support</title>
     <section>
       <title>Status</title>
       <p>FOP (building PDF files) normally supports only the base 14 font package defined in the Adobe PDF specification.
       That includes the following fonts: Helvetica, Times, Courier, Symbol and ZapfDingbats.
       </p>
       <p>Font support in FOP can be extended by the addition of font metric files (written in XML) created from Adobe
  -    Type 1 fonts and Truetype fonts. No other font types (Type 3, etc.) are supported at this time.
  +    Type 1 fonts and TrueType fonts. No other font types (Type 3, etc.) are supported at this time.
       </p>
       <note>
  -        The Font is simply embedded into the PDF file, it is not converted.
  +        The font is simply embedded into the PDF file, it is not converted.
       </note>
     </section>
     <section>
  @@ -35,18 +33,26 @@
         <p> Run the class org.apache.fop.fonts.apps.PFMReader to generate the XML file.
         </p>
         <p>Windows:</p>
  -                        <p>
  -      <code>java -cp build\fop.jar;lib\xercesImpl-2.0.1.jar;lib\xml-apis.jar;lib\xalan-2.3.1.jar;lib\batik.jar
  -      org.apache.fop.fonts.apps.PFMReader pfm-file xml-file</code>
  -      </p>
  +<source>
  +
  +  java -cp build\fop.jar;lib\avalon-framework.jar;lib\xml-apis.jar;lib\xercesImpl.jar;lib\xalan.jar org.apache.fop.fonts.apps.PFMReader pfm-file xml-file
  +
  +</source>
         <p>Unix:</p>
  -      <p>
  -                        <code>java -cp build/fop.jar:lib/xercesImpl-2.0.1.jar:lib/xml-apis.jar:lib/xalan-2.3.1.jar:lib/batik.jar
  -                        org.apache.fop.fonts.apps.PFMReader pfm-file xml-file</code>
  -      </p>
  +<source>
  +
  +  java -cp build/fop.jar:lib/avalon-framework.jar:lib/xml-apis.jar:lib/xercesImpl.jar:lib/xalan.jar org.apache.fop.fonts.apps.PFMReader pfm-file xml-file
  +
  +</source>
  +      <note>
  +        The classpath in the above example has been simplified for readibity. 
  +        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.
  +      </note>
         <note>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. The PFMReader tool does not yet interpret PFB files, so if you want
  +      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. The constructed values however
         appear to have no visible influence.
         </note>
  @@ -57,30 +63,38 @@
                   Edit conf/userconfig.xml and add entries for the font
                   if the fonts section,
                   ie:
  -    </p>
  -        <p>
  -    <code><![CDATA[
  -<font metrics-file="cyberbit.xml" kerning="yes" embed-file="C:\WINNT\Fonts\Cyberbit.ttf">
  -  <font-triplet name="Cyberbit" style="normal" weight="normal">
  -</font>]]>
  -</code>
  -</p>
  -    <note>
  +      </p>
  +<source>
  +<![CDATA[
  +  <font metrics-file="FTL_____.xml" kerning="yes" embed-file="C:\myfonts\FTL_____.pfb">
  +    <font-triplet name="FrutigerLight" style="normal" weight="normal">
  +  </font>]]>
  +
  +</source>
  +      <note>
  +        Starting from FOP version 0.20.5 you can use URLs for the paths to the font files. Relative URLs are resolved 
  +        relative to the fontBaseDir property (or baseDir) if available.
  +      </note>
  +      <note>
  +        Make sure you specify the PFB file in the embed-file attribute 
  +        and not the PFM you used to generate the XML font metrics file.
  +      </note>
  +      <note>
           If you do not want the font embedded in the PDF then remove the
           "embed-file" attribute. The PDF will then contain text using
           the font with the font metrics and to view it properly the
           font will need to be installed where it is being viewed.
  -    </note>
  -    <note>
  +      </note>
  +      <note>
           Cocoon users will need to setup the config, see FOPSerializer
           for more information.
  -    </note>
  +      </note>
       </section>
     </section>
     <section>
       <title>Adding additional TrueType</title>
  -        <p>Adding Truetype fonts is almost identical to the process of
  -        adding type 1 fonts. The main difference is in the first
  +        <p>Adding TrueType fonts is almost identical to the process of
  +        adding Type 1 fonts. The main difference is in the first
           step.</p>
   
       <section>
  @@ -88,17 +102,20 @@
               <p>As mentioned above you need an XML file containing font
               metrics to be able to use an additional font. FOP contains
               a tool that can generate such a font metrics file from
  -            your truetype font file.
  +            your TrueType font file.
         </p>
         <p>
         Create metrics for the fontfile (we assume the file has
               the name cmr10.ttf and exists in c:\myfonts\):
         </p>
  -      <p>
  -      <code>java -cp build\fop.jar;lib\xercesImpl-2.0.1.jar;lib\xml-apis.jar;lib\xalan-2.3.1.jar;lib\batik.jar org.apache.fop.fonts.apps.TTFReader C:\myfonts\cmr10.ttf C:\myfonts\cmr10.ttf ttfcm.xml</code></p>
  -      </section>
  -      <section>
  -        <title>TrueType collections</title>
  +<source>
  +
  +  java -cp build\fop.jar;lib\avalon-framework.jar;lib\xml-apis.jar;lib\xercesImpl.jar;lib\xalan.jar org.apache.fop.fonts.apps.TTFReader C:\myfonts\cmr10.ttf C:\myfonts\cmr10.ttf ttfcm.xml
  +
  +</source>
  +    </section>
  +    <section>
  +      <title>TrueType collections</title>
         <p>
         TrueType collections (.ttc files) contains more than one
         font. To create metrics for a ttc file you must specify
  @@ -107,38 +124,45 @@
         </p>
         <p>
         To get a list of the fonts in a collection, just start the
  -      TTFReader as if it were a normal truetype file (without
  +      TTFReader as if it were a normal TrueType file (without
         the -ttcname option). It will then display all the font
         names and exit with an Exception...
         </p>
         <p>
         Example on generating metrics for a .ttc file:
         </p>
  -        <p>
  -      <code>
  -      java -cp build\fop.jar;lib\xercesImpl-2.0.1.jar;lib\xml-apis.jar;lib\xalan-2.3.1.jar;lib\batik.jar org.apache.fop.fonts.apps.TTFReader -ttcname "MS Mincho" msmincho.ttc msminch.xml
  -      </code>
  -        </p>
  +<source>
  +      
  +  java -cp build\fop.jar;lib\avalon-framework.jar;lib\xml-apis.jar;lib\xercesImpl.jar;lib\xalan.jar org.apache.fop.fonts.apps.TTFReader -ttcname "MS Mincho" msmincho.ttc msminch.xml
  +
  +</source>
       </section>
   
         <section>
           <title>Register the fonts within FOP</title>
  -      <p>
  -      Same as for Type 1 fonts.
  -      </p>
  -        </section>
  +        <p>
  +          Similiar to Type 1 fonts.
  +        </p>
  +<source>
  +<![CDATA[
  +  <font metrics-file="cyberbit.xml" kerning="yes" embed-file="C:\WINNT\Fonts\Cyberbit.ttf">
  +    <font-triplet name="Cyberbit" style="normal" weight="normal">
  +  </font>]]>
  +
  +</source>
  +      </section>
   
  -        <section>
  -          <title>Embedding fonts</title>
  -            <p>
  -            Font embedding is enabled in the userconfig.xml file.
  -      </p>
  -        </section>
     </section>
  +  <section>
  +    <title>Embedding fonts</title>
       <p>
  -  Remember to start fop with -c conf/userconfig.xml
  +      Font embedding is enabled in the userconfig.xml file and controlled over the embed-file attribute.
  +      If you don't specify the embed-file attribute the fonts doesn't get embedded but only referenced.
       </p>
  -</section>
  +    <note>
  +      Remember to start fop with -c conf/userconfig.xml on the command line.
  +    </note>
  +  </section>
   </body>
   </document>
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org