vmote       2003/07/09 12:31:49

  Modified:    src/documentation/content/xdocs fonts.xml
  Log:
  1. rearrange some content into a summary table
  2. misc cleanup
  3. working toward some consolidation
  
  Revision  Changes    Path
  1.12      +132 -113  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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- fonts.xml 9 Jul 2003 18:01:42 -0000       1.11
  +++ fonts.xml 9 Jul 2003 19:31:48 -0000       1.12
  @@ -4,7 +4,7 @@
   
   <document>
     <header>
  -    <title>Fonts</title>
  +    <title>FOP: Fonts</title>
       <authors>
         <person name="Jeremias Märki" email=""/>
         <person name="Tore Engvig" email=""/>
  @@ -12,142 +12,160 @@
     </header>
   <body>
     <section id="intro">
  -    <title>Important</title>
  -    <p>The information on this page applies primarily to the PDF renderer. The 
PostScript renderer
  -    also supports custom fonts but does not yet support font embedding. This page 
does 
  -    <strong>not</strong> apply to the AWT, PCL, MIF and other renderers.</p>
  -    <p>When using the AWT renderer, font metric information is available to FOP 
through AWT and the operating system (i.e. there is no need for font metrics files), 
and the operating system printer driver decides whether a font will be embedded.</p>
  +    <title>Summary</title>
  +    <p>The following table summarizes the font capabilites of the various FOP 
renderers:</p>
  +    <table>
  +      <tr>
  +        <th>Renderer</th>
  +        <th>Base-14</th>
  +        <th>AWT/OS</th>
  +        <th>Custom</th>
  +        <th>Embedding</th>
  +      </tr>
  +      <tr>
  +        <td>PDF</td>
  +        <td>yes</td>
  +        <td>no</td>
  +        <td>yes</td>
  +        <td>yes</td>
  +      </tr>
  +      <tr>
  +        <td>PostScript</td>
  +        <td>yes</td>
  +        <td>no</td>
  +        <td>yes</td>
  +        <td>no</td>
  +      </tr>
  +      <tr>
  +        <td>PCL</td>
  +        <td>yes (modified)</td>
  +        <td>no</td>
  +        <td>no</td>
  +        <td>no</td>
  +      </tr>
  +      <tr>
  +        <td>TXT</td>
  +        <td>yes (used for layout but not for output)</td>
  +        <td>no</td>
  +        <td>yes (used for layout but not for output)</td>
  +        <td>no</td>
  +      </tr>
  +      <tr>
  +        <td>AWT</td>
  +        <td>if available from OS</td>
  +        <td>yes</td>
  +        <td>no</td>
  +        <td>n/a (display only)</td>
  +      </tr>
  +      <tr>
  +        <td>Print</td>
  +        <td>if available from OS</td>
  +        <td>yes</td>
  +        <td>no</td>
  +        <td>controlled by OS printer driver</td>
  +      </tr>
  +      <tr>
  +        <td>RTF</td>
  +        <td>n/a (font metrics not needed)</td>
  +        <td>n/a</td>
  +        <td>n/a</td>
  +        <td>n/a</td>
  +      </tr>
  +      <tr>
  +        <td>MIF</td>
  +        <td>n/a (font metrics not needed)</td>
  +        <td>n/a</td>
  +        <td>n/a</td>
  +        <td>n/a</td>
  +      </tr>
  +      <tr>
  +        <td>SVG</td>
  +        <td>if available from OS</td>
  +        <td>yes</td>
  +        <td>no</td>
  +        <td>no</td>
  +      </tr>
  +      <tr>
  +        <td>XML</td>
  +        <td>yes</td>
  +        <td>no</td>
  +        <td>yes</td>
  +        <td>n/a</td>
  +      </tr>
  +    </table>
     </section>
  -  <section id="status">
  -    <title>Status</title>
  -    <p>When building PDF files, FOP normally supports only the base-14 fonts 
defined in the Adobe PDF specification.
  -These include: Helvetica (normal, bold, italic, bold italic), Times (normal, bold, 
italic, bold italic), Courier (normal, bold, italic, bold italic), 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.
  +  <section>
  +    <title>Base-14 Fonts</title>
  +    <p>The Adobe PDF Specification specifies a set of 14 fonts that must be 
available to every PDF reader: Helvetica (normal, bold, italic, bold italic), Times 
(normal, bold, italic, bold italic), Courier (normal, bold, italic, bold italic), 
Symbol and ZapfDingbats.</p>
  +  </section>
  +  <section id="awt">
  +    <title>AWT/Operating System Fonts</title>
  +    <p>The AWT family of renderers (AWT, Print, SVG), use the Java AWT libraries 
for font metric information. Through operating system registration, the AWT libraries 
know what fonts are available on the system, and the font metrics for each one.</p>
  +  </section>
  +  <section id="custom">
  +    <title>Custom Fonts</title>
  +    <p>Support for custom fonts is added by creating font metric files (written in 
XML) from the actual font files, and registering them with FOP. Currently only Type 1 
and TrueType fonts can be added.
       More information about font types can be found at
       the <link href="http://partners.adobe.com/asn/developer/type/ftypes.html";>
       Adobe font types</link>. There is also lots more font information
       on this <link 
href="http://partners.adobe.com/asn/developer/technotes/fonts.html";>Adobe Font 
Technote</link>.
       </p>
  -    <note>
  -        The font is simply embedded into the PDF file, it is not converted.
  -    </note>
  -  </section>
  -  <section id="type1">
  -    <title>Adding Type 1 fonts</title>
  -    <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 a PFM file, 
which normally comes with the font file.
  -    </p>
       <section id="type1-metrics">
  -      <title>Generating a font metrics file</title>
  -      <p> Run the class org.apache.fop.fonts.apps.PFMReader to generate the XML 
file.
  -      </p>
  +      <title>Create Type 1 Font Metrics</title>
  +      <p>FOP includes a tool that can generate an appropriate font metrics file 
from the PFM file that normally comes with the Type 1 font file.
  +To use it, run the class org.apache.fop.fonts.apps.PFMReader:</p>
         <p>Windows:</p>
  -<source>
  -java -cp build\fop.jar;lib\avalon-framework.jar;lib\xml-apis.jar;
  +      <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>
  +           org.apache.fop.fonts.apps.PFMReader pfm-file xml-file</source>
         <p>Unix:</p>
  -<source>
  -java -cp build/fop.jar:lib/avalon-framework.jar:lib/xml-apis.jar:
  +      <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 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>
  +           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 
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>
       </section>
       <section id="type1-register">
  -      <title>Register the fonts within FOP</title>
  -      <p>
  -        Edit conf/userconfig.xml and add entries for the font
  -        if the fonts section,
  -        ie:
  -      </p>
  -<source><![CDATA[<font metrics-file="FTL_____.xml" kerning="yes"
  +      <title>Register Type 1 Font Metrics with FOP</title>
  +      <p>Edit conf/userconfig.xml and add entries for the font in the fonts 
section, e.g.:</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>
  -        Cocoon users will need to setup the config, see FOPSerializer
  -        for more information.
  -      </note>
  +      <note>Starting with 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>Cocoon users will need to setup the config, see FOPSerializer for more 
information.</note>
       </section>
  -  </section>
  -  <section id="truetype">
  -    <title>Adding TrueType Fonts</title>
  -        <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 id="truetype-metrics">
  -      <title>Generating a font metrics file</title>
  -            <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.
  -      </p>
  -      <p>
  -      Create metrics for the fontfile (we assume the file has
  -            the name cmr10.ttf and exists in c:\myfonts\):
  -      </p>
  -<source>
  -java -cp build\fop.jar;lib\avalon-framework.jar;lib\xml-apis.jar;
  +      <title>Creating TrueType Font Metrics</title>
  +      <p>FOP includes a tool that can generate an appropriate font metrics file 
from your TrueType font file. To create such a file in Windows from the TrueType font 
at c:\myfonts\cmr10.ttf:</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
  -             C:\myfonts\cmr10.ttf ttfcm.xml
  -</source>
  +             C:\myfonts\cmr10.ttf ttfcm.xml</source>
       </section>
  -    <section id="truetype-collections">
  -      <title>TrueType collections</title>
  -      <p>
  -      TrueType collections (.ttc files) contains more than one
  -      font. To create metrics for a ttc file you must specify
  -      the font in the collection with the -ttcname option to
  -      TTFReader.
  -      </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
  -      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>
  -<source>
  -java -cp build\fop.jar;lib\avalon-framework.jar;lib\xml-apis.jar;
  +    <section id="truetype-collections-metrics">
  +      <title>Creating TrueType Collections Font Metrics</title>
  +      <p>TrueType collections (.ttc files) contains more than one font.
  +To create metrics files for these fonts, you must specify which font in the 
collection should be generated, by using the "-ttcname" option with the TTFReader:</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 the -ttcname option).
  +It will display all of the font names and exit with an Exception.</p>
  +      <p>Example on generating metrics for a .ttc file:</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>
  +             msmincho.ttc msminch.xml</source>
       </section>
  -
         <section id="truetype-register">
           <title>Register the fonts within FOP</title>
           <p>
  @@ -158,10 +176,11 @@
     <font-triplet name="Cyberbit" style="normal" weight="normal"/>
   </font>]]></source>
         </section>
  -
     </section>
     <section id="embedding">
       <title>Embedding fonts</title>
  +    <note>The PostScript renderer does not yet support font embedding.</note>
  +    <note>The font is simply embedded into the PDF file, it is not converted.</note>
       <p>
         Font embedding is enabled in the userconfig.xml file and controlled by the 
embed-file attribute.
         If you don't specify the embed-file attribute the font will not be embedded, 
but will only be referenced.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to