xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spepp...@apache.org
Subject svn commit: r966110 [16/29] - in /xmlgraphics/site/deploy/fop: 0.95/ 1.0/ 1.0/images/
Date Wed, 21 Jul 2010 07:08:43 GMT
Added: xmlgraphics/site/deploy/fop/1.0/fonts.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/site/deploy/fop/1.0/fonts.xml?rev=966110&view=auto
==============================================================================
--- xmlgraphics/site/deploy/fop/1.0/fonts.xml (added)
+++ xmlgraphics/site/deploy/fop/1.0/fonts.xml Wed Jul 21 07:08:39 2010
@@ -0,0 +1,561 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--><!-- $Id$ --><!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.3//EN" "document-v13.dtd">
+<document>
+  <header>
+    <title>Apache FOP: Fonts</title>
+    <version>$Revision: 964711 $</version>
+    <authors>
+      <person name="Jeremias Märki" email=""/>
+      <person name="Tore Engvig" email=""/>
+      <person name="Adrian Cumiskey" email=""/>
+      <person name="Max Berger" email=""/>
+    </authors>
+  </header>
+  <body>
+    <section id="intro">
+      <title>Summary</title>
+      <p>The following table summarizes the font capabilities of the various FOP renderers:</p>
+      <table>
+        <tr>
+          <th colspan="1" rowspan="1">Renderer</th>
+          <th colspan="1" rowspan="1">Base-14</th>
+          <th colspan="1" rowspan="1">AWT/OS</th>
+          <th colspan="1" rowspan="1">Custom</th>
+          <th colspan="1" rowspan="1">Custom Embedding</th>
+        </tr>
+        <tr>
+          <td colspan="1" rowspan="1">PDF</td>
+          <td colspan="1" rowspan="1">yes</td>
+          <td colspan="1" rowspan="1">no</td>
+          <td colspan="1" rowspan="1">yes</td>
+          <td colspan="1" rowspan="1">yes</td>
+        </tr>
+        <tr>
+          <td colspan="1" rowspan="1">PostScript</td>
+          <td colspan="1" rowspan="1">yes</td>
+          <td colspan="1" rowspan="1">no</td>
+          <td colspan="1" rowspan="1">yes</td>
+          <td colspan="1" rowspan="1">yes</td>
+        </tr>
+        <tr>
+          <td colspan="1" rowspan="1">PCL</td>
+          <td colspan="1" rowspan="1">yes (modified)</td>
+          <td colspan="1" rowspan="1">yes (painted as bitmaps)</td>
+          <td colspan="1" rowspan="1">yes (painted as bitmaps)</td>
+          <td colspan="1" rowspan="1">no</td>
+        </tr>
+        <tr>
+          <td colspan="1" rowspan="1">AFP</td>
+          <td colspan="1" rowspan="1">no</td>
+          <td colspan="1" rowspan="1">no</td>
+          <td colspan="1" rowspan="1">yes</td>
+          <td colspan="1" rowspan="1">yes</td>
+        </tr>
+        <tr>
+          <td colspan="1" rowspan="1">Java2D/AWT/Bitmap</td>
+          <td colspan="1" rowspan="1">if available from OS</td>
+          <td colspan="1" rowspan="1">yes</td>
+          <td colspan="1" rowspan="1">yes</td>
+          <td colspan="1" rowspan="1">n/a (display only)</td>
+        </tr>
+        <tr>
+          <td colspan="1" rowspan="1">Print</td>
+          <td colspan="1" rowspan="1">if available from OS</td>
+          <td colspan="1" rowspan="1">yes</td>
+          <td colspan="1" rowspan="1">yes</td>
+          <td colspan="1" rowspan="1">controlled by OS printer driver</td>
+        </tr>
+        <tr>
+          <td colspan="1" rowspan="1">RTF</td>
+          <td colspan="1" rowspan="1">n/a (font metrics not needed)</td>
+          <td colspan="1" rowspan="1">n/a</td>
+          <td colspan="1" rowspan="1">n/a</td>
+          <td colspan="1" rowspan="1">n/a</td>
+        </tr>
+        <tr>
+          <td colspan="1" rowspan="1">TXT</td>
+          <td colspan="1" rowspan="1">yes (used for layout but not for output)</td>
+          <td colspan="1" rowspan="1">no</td>
+          <td colspan="1" rowspan="1">yes (used for layout but not for output)</td>
+          <td colspan="1" rowspan="1">no</td>
+        </tr>
+<!--tr> NOT AVAILABLE
+          <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> NOT AVAILABLE
+          <td>SVG</td>
+          <td>if available from OS</td>
+          <td>yes</td>
+          <td>no</td>
+          <td>no</td>
+        </tr-->
+        <tr>
+          <td colspan="1" rowspan="1">XML</td>
+          <td colspan="1" rowspan="1">yes</td>
+          <td colspan="1" rowspan="1">no</td>
+          <td colspan="1" rowspan="1">yes</td>
+          <td colspan="1" rowspan="1">n/a</td>
+        </tr>
+      </table>
+    </section>
+    <section>
+      <title>Base-14 Fonts</title>
+      <p>
+        The Adobe PostScript and PDF Specification specify a set of 14 fonts that must be
+        available to every PostScript interpreter and PDF reader:
+        Helvetica (normal, bold, italic, bold italic),
+        Times (normal, bold, italic, bold italic),
+        Courier (normal, bold, italic, bold italic),
+        Symbol and ZapfDingbats.
+      </p>
+      <p>
+        The following font family names are hard-coded into FOP for the Base-14 font set:
+      </p>
+      <table>
+        <tr>
+          <th colspan="1" rowspan="1">Base-14 font</th>
+          <th colspan="1" rowspan="1">font families</th>
+        </tr>
+        <tr>
+          <td colspan="1" rowspan="1">Helvetica</td>
+          <td colspan="1" rowspan="1">Helvetica, sans-serif, SansSerif</td>
+        </tr>
+        <tr>
+          <td colspan="1" rowspan="1">Times</td>
+          <td colspan="1" rowspan="1">Times, Times Roman, Times-Roman, serif, any</td>
+        </tr>
+        <tr>
+          <td colspan="1" rowspan="1">Courier</td>
+          <td colspan="1" rowspan="1">Courier, monospace, Monospaced</td>
+        </tr>
+        <tr>
+          <td colspan="1" rowspan="1">Symbol</td>
+          <td colspan="1" rowspan="1">Symbol</td>
+        </tr>
+        <tr>
+          <td colspan="1" rowspan="1">ZapfDingbats</td>
+          <td colspan="1" rowspan="1">ZapfDingbats</td>
+        </tr>
+      </table>
+      <p>
+        Please note that recent versions of Adobe Acrobat Reader replace
+        "Helvetica" with "Arial" and "Times" with "Times New Roman" internally.
+        GhostScript replaces "Helvetica" with "Nimbus Sans L" and "Times" with 
+        "Nimbus Roman No9 L". Other document viewers may do similar font
+        substitutions. If you need to make sure that there are no such
+        substitutions, you need to specify an explicit font and embed it in
+        the target document.
+      </p>
+    </section>
+    <section id="missing-fonts">
+      <title>Missing Fonts</title>
+      <p>
+        When FOP does not have a specific font at its disposal (because it's 
+        not installed in the operating system or set up in FOP's configuration),
+        the font is replaced with "any". "any" is internally mapped to the
+        Base-14 font "Times" (see above).
+      </p>
+    </section>
+    <section id="missing-glyphs">
+      <title>Missing Glyphs</title>
+      <p>
+        Every font contains a particular set of
+        <link href="http://en.wikipedia.org/wiki/Glyph">glyphs</link>. If no glyph can be found for
+        a given character, FOP will issue a warning and use the glpyh for "#" (if available)
+        instead. Before it does that, it consults a (currently hard-coded) registry of
+        glyph substitution groups (see Glyphs.java in Apache XML Graphics Commons).
+        This registry can supply alternative glyphs in some cases (like using space when a no-break
+        space is requested). But there's no guarantee that the result will be as expected (for
+        example, in the case of hyphens and similar glyphs). A better way is to use a font that
+        has all the necessary glyphs. This glyph substitution is only a last resort.
+      </p>
+    </section>
+    <section id="awt">
+      <title>Java2D/AWT/Operating System Fonts</title>
+      <p>
+        The Java2D family of renderers (Java2D, AWT, Print, TIFF, PNG), use the
+        Java AWT subsystem for font metric information. Through operating system
+        registration, the AWT subsystem knows what fonts are available on the system,
+        and the font metrics for each one.
+      </p>
+      <p>
+        When working with one of these output formats and you're missing a font, just
+        install it in your operating system and they should be available for these
+        renderers. Please note that this is not true for other output formats such as
+        PDF or PostScript.
+      </p>
+    </section>
+    <section id="custom">
+      <title>Custom Fonts</title>
+      <p>
+        Support for custom fonts is highly output format dependent (see above table).
+        This section shows how to add Type 1 and TrueType fonts to the PDF, PostScript and
+        Java2D-based renderers. Other renderers (like AFP) support other font formats. Details
+        in this case can be found on the page about <link href="output.html">output formats</link>.
+      </p>
+      <p>
+        In earlier FOP versions, it was always necessary to create an XML font metrics file
+        if you wanted to add a custom font. This unconvenient step has been removed and in
+        addition to that, FOP supports auto-registration of fonts, i.e. FOP can find fonts
+        installed in your operating system or can scan user-specified directories for fonts.
+        Font registration via XML font metrics file is still supported and may still be necessary
+        for some very special cases as fallback variant while we stabilize font auto-detection.
+      </p>
+      <p>
+        Basic information about fonts can be found at:
+      </p>
+      <ul>
+        <li>
+          <link href="http://partners.adobe.com/asn/developer/type/ftypes.html">Adobe font types</link>
+        </li>
+        <li>
+          <link href="http://partners.adobe.com/asn/developer/technotes/fonts.html">Adobe Font Technote</link>
+        </li>
+      </ul>
+    </section>
+    <section id="basics">
+      <title>Basic font configuration</title>
+      <p>
+        If you want FOP to use custom fonts, you need to tell it where to find them. This
+        is done in the configuration file and once per renderer (because each output format
+        is a little different). In the basic form, you can either tell FOP to find your
+        operating system fonts or you can specify directories that it will search for
+        support fonts. These fonts will then automatically be registered.
+      </p>
+      <source xml:space="preserve"><![CDATA[
+<renderers>
+   <renderer mime="application/pdf">
+      <fonts>
+         <!-- register all the fonts found in a directory -->
+         <directory>C:\MyFonts1</directory>
+  
+         <!-- register all the fonts found in a directory and all of its sub directories (use with care) -->
+         <directory recursive="true">C:\MyFonts2</directory>
+
+         <!-- automatically detect operating system installed fonts -->
+         <auto-detect/>  
+      </fonts>
+   </renderer>
+</renderers>]]></source>
+      <note>
+        Review the documentation for <link href="configuration.html">FOP Configuration</link>
+        for instructions on making the FOP configuration available to FOP when it runs.
+        Otherwise, FOP has no way of finding your custom font information. It is currently
+        not possible to easily configure fonts from Java code.
+      </note>
+    </section>
+    <section id="advanced">
+      <title>Advanced font configuration</title>
+      <p>
+        The instructions found above should be sufficient for most users. Below are some
+        additional instructions in case the basic font configuration doesn't lead to
+        the desired results.
+      </p>
+      <section id="type1-metrics">
+        <title>Type 1 Font Metrics</title>
+        <p>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:</p>
+        <p>Windows:</p>
+        <source xml:space="preserve"><![CDATA[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]]></source>
+        <p>Unix:</p>
+        <source xml:space="preserve"><![CDATA[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]]></source>
+        <p>PFMReader [options]:</p>
+        <ul>
+          <li><strong>-fn &lt;fontname&gt;</strong> By default, FOP uses the fontname from the
+            .pfm file when embedding the font. Use the "-fn" option to override this name with one you have
+            chosen. This may be useful in some cases to ensure that applications using the output document
+            (Acrobat Reader for example) use the embedded font instead of a local font with the same
+            name.</li>
+        </ul>
+        <note>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.
+          xml-apis.jar, xercesImpl.jar, xalan.jar and serializer.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="truetype-metrics">
+        <title>TrueType Font Metrics</title>
+        <p>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:</p>
+        <source xml:space="preserve"><![CDATA[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]]></source>
+        <p>TTFReader [options]:</p>
+        <ul>
+          <li><strong>-d &lt;DEBUG | INFO &gt;</strong> Sets the debug level (default is
+            INFO).</li>
+          <li><strong>-fn &lt;fontname&gt;</strong> Same as for PFMReader.</li>
+          <li><strong>-ttcname &lt;fontname&gt;</strong> If you're reading data from a
+            TrueType Collection (.ttc file) you must specify which font from the collection you will read
+            metrics from.
+            If you read from a .ttc file without this option, the fontnames will be listed for you.</li>
+          <li><strong>-enc ansi</strong> Creates a WinAnsi-encoded font metrics file.
+            Without this option, a CID-keyed font metrics file is created.
+            The table below summarizes the differences between these two encoding options as currently
+            used within FOP.
+            Please note that this information only applies to TrueType fonts and TrueType collections:</li>
+        </ul>
+        <table id="ttf-encoding">
+          <tr>
+            <th colspan="1" rowspan="1">Issue</th>
+            <th colspan="1" rowspan="1">WinAnsi</th>
+            <th colspan="1" rowspan="1">CID-keyed</th>
+          </tr>
+          <tr>
+            <td colspan="1" rowspan="1">Usable Character Set</td>
+            <td colspan="1" rowspan="1">Limited to WinAnsi character set, which is roughly equivalent to iso-8889-1.</td>
+            <td colspan="1" rowspan="1">Limited only by the characters in the font itself.</td>
+          </tr>
+          <tr>
+            <td colspan="1" rowspan="1">Embedding the Font</td>
+            <td colspan="1" rowspan="1">Optional.</td>
+            <td colspan="1" rowspan="1">Mandatory. Not embedding the font produces invalid PDF documents.</td>
+          </tr>
+        </table>
+        <warning>
+          You may experience failures with certain TrueType fonts, especially if they don't contain 
+          the so-called Unicode "cmap" table. TTFReader can currently not deal with font like this.
+        </warning>
+      </section>
+      <section id="truetype-collections-metrics">
+        <title>TrueType Collections</title>
+        <p>TrueType collections (.ttc files) contain 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>Here is an example of generating a metrics file for a .ttc file:</p>
+        <source xml:space="preserve"><![CDATA[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]]></source>
+        <p>
+          Alternatively, the individual sub-fonts of a TrueType Collections can be selected
+          using the "sub-font" attribute on the "font" element. That means that generating
+          an XML font metrics file for TrueType collections is not necessary anymore. Example:
+        </p>
+        <source xml:space="preserve"><![CDATA[<font embed-url="gulim.ttc" sub-font="GulimChe">
+  <font-triplet name="GulimChe" style="normal" weight="normal"/>
+</font>]]></source>
+      </section>
+      <section id="register">
+        <title>Register Fonts with FOP</title>
+        <p>You must tell FOP how to find and use the font metrics files by registering them in the <link href="configuration.html">FOP Configuration</link>. Add entries for your custom fonts, regardless of font type, to the configuration file in a manner similar to the following:</p>
+        <source xml:space="preserve"><![CDATA[
+<renderers>
+   <renderer mime="application/pdf">
+      <fonts>
+         <!-- register a particular font -->
+         <font metrics-url="file:///C:/myfonts/FTL_____.xml" kerning="yes"
+           embed-url="file:///C:/myfonts/FTL_____.pfb"
+           encoding-mode="single-byte">
+            <font-triplet name="FrutigerLight" style="normal" weight="normal"/>
+         </font>
+  
+         <!-- register all the fonts found in a directory -->
+         <directory>C:\MyFonts1</directory>
+  
+         <!-- register all the fonts found in a directory and all of its sub directories (use with care) -->
+         <directory recursive="true">C:\MyFonts2</directory>
+
+         <!-- automatically detect operating system installed fonts -->
+         <auto-detect/>  
+      </fonts>
+   </renderer>
+</renderers>]]></source>
+        <ul>
+          <li>
+            URLs are used to access the font metric and font files.
+            Relative URLs are resolved relative to the font-base property (or base) if available.
+            See <link href="configuration.html">FOP: Configuration</link> for more information.
+          </li>
+          <li>The "metrics-url" attribute is generally not necessary except if you run into problems with certain fonts.</li>
+          <li>Either an "embed-url" or a "metrics-url" must be specified for font tag configurations.</li>
+          <li>The font "kerning" attribute is optional. Default is "true".</li>
+          <li>If embedding is off (i.e. embed-url is not set), the output will position the text correctly (from the metrics file), but it will not be displayed or printed correctly unless the viewer has the applicable font available to their local system.</li>
+          <li>When setting the "embed-url" attribute for Type 1 fonts, be sure to specify the PFB (actual font data), not PFM (font metrics) file that you used to generate the XML font metrics file.</li>
+          <li>The attribute "encoding-mode" is optional an may have the following values:
+            <ul>
+              <li>auto: default font encoding mode ("cid" for Truetype, "single-byte" for Type 1)</li>
+              <li>single-byte: use single-byte encodings in the target format (if applicable)</li>
+              <li>cid: encode as CID-keyed font (currently only supported for PDF output with TrueType fonts)</li>
+            </ul>
+          </li>
+          <li>The fonts "directory" tag can be used to register fonts contained within a single or list of directory paths.  The "recursive" attribute can be specified to recursively add fonts from all sub directories.</li>
+          <li>The fonts "auto-detect" tag can be used to automatically register fonts that are found to be installed on the native operating system.</li>
+          <li>Fonts registered with "font" tag configurations override fonts found by means of "directory" tag definitions.</li>
+          <li>Fonts found as a result of a "directory" tag configuration override fonts found as a result of the "auto-detect" tag being specified.</li>
+          <li>
+            If relative URLs are specified, they are evaluated relative to the value of the 
+            "font-base" setting. If there is no "font-base" setting, the fonts are evaluated 
+            relative to the base directory.
+          </li>
+        </ul>
+<!--note>Cocoon users will need to setup the config, see FOPSerializer for more information.</note-->
+      </section>
+      <section id="autodetect">
+        <title>Auto-Detect and auto-embed feature</title>
+        <p>When the "auto-detect" flag is set in the configuration, FOP will automatically search for fonts in the default paths for your operating system.</p>
+        <p>FOP will also auto-detect fonts which are available in the classpath, if they are described as "application/x-font" in the MANIFEST.MF file. For example, if your .jar file contains font/myfont.ttf:</p>
+        <source xml:space="preserve"><![CDATA[Manifest-Version: 1.0
+          
+          Name: font/myfont.ttf
+          Content-Type: application/x-font]]></source>
+        <p>This feature allows you to create JAR files containing fonts. The JAR files can be added to fop by providem them in the classpath, e.g. copying them into the lib/ directory.</p>
+      </section>
+      <section id="embedding">
+        <title>Embedding</title>
+        <p>
+          By default, all fonts are embedded if an output format supports font embedding. In some
+          cases, however, it is preferred that some fonts are only referenced. When working
+          with referenced fonts it is important to be in control of the target environment where
+          the produced document is consumed, i.e. the necessary fonts have to be installed there.
+        </p>
+        <p>
+          There are two different ways how you can specify that a font should be referenced:
+        </p>
+        <ol>
+          <li>
+            When using the old-style "font" element to configure a single font, font referencing
+            is controlled by the embed-url attribute. If you don't specify the embed-url attribute
+            the font will not be embedded, but will only be referenced.
+          </li>
+          <li>
+            For automatically configured fonts there's a different mechanism to specify which
+            fonts should be referenced rather than embedded. This is done in the "referenced-fonts"
+            element in the configuration. Here's an example:
+          </li>
+        </ol>
+        <source xml:space="preserve"><![CDATA[
+<fop version="1.0">
+   <fonts>
+      <referenced-fonts>
+        <match font-family="Helvetica"/>
+        <match font-family="DejaVu.*"/>
+      </referenced-fonts>
+   </fonts>
+</fop>]]></source>
+        <p>
+          At the moment, you can only match fonts against their font-family. It is possible to use
+          regular expressions as is shown in the second example above ("DejaVu.*"). The syntax for
+          the regular expressions used here are the one used by the
+          <link href="http://java.sun.com/j2se/1.4/docs/api/java/util/regex/package-summary.html"><code>java.util.regex</code> package</link>.
+          So, in the above snippet "Helvetica" and all variants of the "DejaVu" font family are
+          referenced. If you want to reference all fonts, just specify <code>font-family=".*"</code>.
+        </p>
+        <p>
+          The <code>referenced-fonts</code> element can be placed either inside the general
+          <code>fonts</code> element (right under the root) or in the <code>fonts</code> element
+          under the renderer configuration. In the first case, matches apply to all renderers.
+          In the second case, matches only apply to the renderer where the element was specified.
+          Both cases can be used at the same time.
+        </p>
+        <p>
+          Various notes related to embedded fonts:
+        </p>
+        <ul>
+          <li>The PostScript renderer does not yet support TrueType fonts, but can embed Type 1 fonts.</li>
+          <li>The font is simply embedded into the PDF file, it is not converted.</li>
+          <li>When FOP embeds a font, it adds a prefix to the fontname to ensure that the name will not match the fontname of an installed font.
+            This is helpful with older versions of Acrobat Reader that preferred installed fonts over embedded fonts.</li>
+          <li>When embedding PostScript fonts, the entire font is always embedded.</li>
+          <li>When embedding TrueType fonts (ttf) or TrueType Collections (ttc), a subset of the
+          original font, containing only the glyphs used, is embedded in the output document.
+          That's the default, but if you specify encoding-mode="single-byte" (see above), the
+          complete font is embedded.</li>
+        </ul>
+      </section>
+      <section id="substitution">
+        <title>Substitution</title>
+        <p>When a &lt;substitutions/&gt; section is defined in the configuration, FOP will re-map any font-family references found in your FO input to a given substitution font.</p>
+        <ul>
+          <li>If a &lt;substitution/&gt; is declared, it is mandatory that both a &lt;from/&gt; and &lt;to/&gt; child element is declared with a font-family attribute.</li>
+          <li>Both font-weight and font-style are optional attributes, if they are provided then a value of 'normal' is assumed.</li>
+        </ul>
+        <p>For example you could make all FO font-family references to 'Arial' with weights between 700 and 900 reference the normal 'Arial Black' font.</p>
+        <source xml:space="preserve"><![CDATA[
+<fop version="1.0">
+   <fonts>
+      <substitutions>
+         <substitution>
+            <from font-family="Arial" font-weight="700..900"/>
+            <to font-family="Arial Black"/>
+         </substitution>
+         <substitution>
+            <from font-family="FrutigerLight"/>
+            <to font-family="Times" font-weight="bold" font-style="italic"/>
+         </substitution>
+      </substitutions>
+   </fonts>
+</fop>]]></source>
+      </section>
+<!-- The following section should no longer be required
+      <section id="embedding-base14">
+        <title>Explicitly embedding the base 14 fonts</title>
+        <p>
+          There are cases where you might want to force the embedding of one or more of the base 14 fonts that
+          can normally be considered available on the target platform (viewer, printer). One of these cases is
+          <a href="pdfa.html">PDF/A</a> which mandates the embedding of even the base 14 fonts. Embedding a font such as Helvetica or
+          Courier is straight-forward. The "Symbol" and "ZapfDingbats" fonts, however, currently present a 
+          problem because FOP cannot correctly determine the encoding of these two single-byte fonts through
+          the PFM file. FOP now correctly interprets the "encoding" value in the XML font metrics file, but the
+          PFMReader application writes "UnknownEncoding" to the generated XML file. In order to embed "Symbol"
+          and "ZapfDingbats" you have to manually change the XML font metrics file and specify "SymbolEncoding"
+          or "ZapfdingbatsEncoding" encoding respectively as the value for the "encoding" element.
+        </p>
+        <p>Example:</p>
+        <source><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<font-metrics type="TYPE1">
+  <font-name>Symbol</font-name>
+  <embed/>
+  <encoding>SymbolEncoding</encoding>
+  <cap-height>673</cap-height>
+  <x-height>766</x-height>
+  [..]]]></source>
+      </section-->
+    </section>
+    <section id="selection">
+      <title>Font Selection Strategies</title>
+      <p>
+          There are two font selection strategies: character-by-character or auto. The default is auto.</p>
+      <p>Auto selected the first font from the list which is able to display the most characters in a given word. This means (assume font A has characters for abclmn, font B for lnmxyz, fontlist is A,B):</p>
+      <ul>
+        <li>aaa lll xxx would be displayed in fonts A A B</li>
+        <li>aaaxx would be displayed in font A</li>
+        <li>aaaxxx would be displayed in font A</li>
+        <li>aaaxxxx would be displayed in font B</li>
+      </ul>
+      <p>Character-by-Character is NOT yet supported!</p>
+    </section>
+    <section id="font-list">
+      <title>Font List Command-Line Tool</title>
+      <p>
+        FOP contains a small command-line tool that lets you generate a list of all configured
+        fonts. Its class name is: <code>org.apache.fop.tools.fontlist.FontListMain</code>.
+        Run it with the "-?" parameter to get help for the various options.
+      </p>
+    </section>
+  </body>
+</document>

Propchange: xmlgraphics/site/deploy/fop/1.0/fonts.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/site/deploy/fop/1.0/fonts.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: xmlgraphics/site/deploy/fop/1.0/graphics.html
URL: http://svn.apache.org/viewvc/xmlgraphics/site/deploy/fop/1.0/graphics.html?rev=966110&view=auto
==============================================================================
--- xmlgraphics/site/deploy/fop/1.0/graphics.html (added)
+++ xmlgraphics/site/deploy/fop/1.0/graphics.html Wed Jul 21 07:08:39 2010
@@ -0,0 +1,985 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="Apache Forrest" name="Generator">
+<meta name="Forrest-version" content="0.8">
+<meta name="Forrest-skin-name" content="pelt">
+<title>Apache FOP: Graphics Formats</title>
+<link type="text/css" href="../skin/basic.css" rel="stylesheet">
+<link media="screen" type="text/css" href="../skin/screen.css" rel="stylesheet">
+<link media="print" type="text/css" href="../skin/print.css" rel="stylesheet">
+<link type="text/css" href="../skin/profile.css" rel="stylesheet">
+<script src="../skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="../skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="../skin/fontsize.js" language="javascript" type="text/javascript"></script>
+<link rel="shortcut icon" href="../">
+</head>
+<body onload="init()">
+<script type="text/javascript">ndeSetTextSize();</script>
+<div id="top">
+<!--+
+    |header
+    +-->
+<div class="header">
+<!--+
+    |start group logo
+    +-->
+<div class="grouplogo">
+<a href="http://xmlgraphics.apache.org/"><img class="logoImage" alt="Apache XML Graphics" src="../images/group-logo.gif" title="Apache XML Graphics is responsible for the creation and maintenance of software for managing the conversion of XML formats to graphical output, and the creation and maintenance of related software components, based on software licensed to the Foundation"></a>
+</div>
+<!--+
+    |end group logo
+    +-->
+<!--+
+    |start Project Logo
+    +-->
+<div class="projectlogo">
+<a href="http://xmlgraphics.apache.org/fop/"><img class="logoImage" alt="Apache FOP" src="../images/logo.jpg" title="Apache FOP (Formatting Objects Processor) is the world's first output independent formatter. Output formats currently supported include PDF, PCL, PS, SVG, XML (area tree representation), Print, AWT, MIF and TXT. The primary output target is PDF."></a>
+</div>
+<!--+
+    |end Project Logo
+    +-->
+<!--+
+    |start Search
+    +-->
+<div class="searchbox">
+<form action="http://www.google.com/search" method="get" class="roundtopsmall">
+<input value="xmlgraphics.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google">&nbsp; 
+                    <input name="Search" value="Search" type="submit">
+</form>
+</div>
+<!--+
+    |end search
+    +-->
+<!--+
+    |start Tabs
+    +-->
+<ul id="tabs">
+<li>
+<a class="unselected" href="../index.html">Home</a>
+</li>
+<li>
+<a class="unselected" href="../0.95/index.html">Version 0.95</a>
+</li>
+<li class="current">
+<a class="selected" href="../1.0/index.html">Version 1.0</a>
+</li>
+<li>
+<a class="unselected" href="../trunk/index.html">FOP Trunk</a>
+</li>
+<li>
+<a class="unselected" href="../dev/index.html">Development</a>
+</li>
+</ul>
+<!--+
+    |end Tabs
+    +-->
+</div>
+</div>
+<div id="main">
+<div id="publishedStrip">
+<!--+
+    |start Subtabs
+    +-->
+<div id="level2tabs"></div>
+<!--+
+    |end Endtabs
+    +-->
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+<a href="http://www.apache.org/">apache.org</a> &gt; <a href="http://xml.apache.org/">XML Federation</a> &gt; <a href="http://xmlgraphics.apache.org/">xmlgraphics.apache.org</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
+</div>
+<!--+
+    |start Menu, mainarea
+    +-->
+<!--+
+    |start Menu
+    +-->
+<div id="menu">
+<div onclick="SwitchMenu('menu_selected_1.1', '../skin/')" id="menu_selected_1.1Title" class="menutitle" style="background-image: url('../skin/images/chapter_open.gif');">FOP 1.0</div>
+<div id="menu_selected_1.1" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../1.0/index.html">About</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/releaseNotes_1.0.html">Release Notes</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/changes_1.0.html">Changes (1.0)</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/knownissues_overview.html">Known Issues</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/upgrading.html">Upgrading</a>
+</div>
+<div onclick="SwitchMenu('menu_1.1.6', '../skin/')" id="menu_1.1.6Title" class="menutitle">Using FOP</div>
+<div id="menu_1.1.6" class="menuitemgroup">
+<div class="menuitem">
+<a href="../1.0/compiling.html">Build</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/configuration.html">Configure</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/running.html">Run</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/embedding.html">Embed</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/servlets.html">Servlets</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/anttask.html">Ant Task</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.1.7', '../skin/')" id="menu_selected_1.1.7Title" class="menutitle" style="background-image: url('../skin/images/chapter_open.gif');">Features</div>
+<div id="menu_selected_1.1.7" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="../1.0/output.html">Output Targets</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/intermediate.html">Intermediate Format</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/pdfencryption.html">PDF Encryption</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/pdfa.html">PDF/A</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/pdfx.html">PDF/X</a>
+</div>
+<div class="menupage">
+<div class="menupagetitle">Graphics</div>
+</div>
+<div class="menuitem">
+<a href="../1.0/fonts.html">Fonts</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/hyphenation.html">Hyphenation</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/extensions.html">Extensions</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/events.html">Events</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/metadata.html">Metadata</a>
+</div>
+<div class="menuitem">
+<a href="../1.0/accessibility.html">Accessibility</a>
+</div>
+</div>
+</div>
+<div id="credit"></div>
+<div id="roundbottom">
+<img style="display: none" class="corner" height="15" width="15" alt="" src="../skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
+<!--+
+  |alternative credits
+  +-->
+<div id="credit2"></div>
+</div>
+<!--+
+    |end Menu
+    +-->
+<!--+
+    |start content
+    +-->
+<div id="content">
+<div title="raw XML" class="xmllink">
+<a class="dida" href="graphics.xml"><img alt="XML - icon" src="../skin/images/xmldoc.gif" class="skin"><br>
+        XML</a>
+</div>
+<div title="Portable Document Format" class="pdflink">
+<a class="dida" href="graphics.pdf"><img alt="PDF -icon" src="../skin/images/pdfdoc.gif" class="skin"><br>
+        PDF</a>
+</div>
+<div class="trail">Font size: 
+	          &nbsp;<input value="Reset" class="resetfont" title="Reset text" onclick="ndeSetTextSize('reset'); return false;" type="button">      
+	          &nbsp;<input value="-a" class="smallerfont" title="Shrink text" onclick="ndeSetTextSize('decr'); return false;" type="button">
+	          &nbsp;<input value="+a" class="biggerfont" title="Enlarge text" onclick="ndeSetTextSize('incr'); return false;" type="button">
+</div>
+<h1>Apache FOP: Graphics Formats</h1>
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#introduction">Introduction</a>
+</li>
+<li>
+<a href="#support-overview">Overview of Graphics Support</a>
+<ul class="minitoc">
+<li>
+<a href="#format-map">Map of supported image formats by output format</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#packages">Graphics Packages</a>
+<ul class="minitoc">
+<li>
+<a href="#native">XML Graphics Commons Native</a>
+</li>
+<li>
+<a href="#fop-native">FOP Native</a>
+</li>
+<li>
+<a href="#batik">Apache Batik</a>
+</li>
+<li>
+<a href="#imageio">Image I/O</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#image-formats">Details on image formats</a>
+<ul class="minitoc">
+<li>
+<a href="#bmp">BMP</a>
+</li>
+<li>
+<a href="#emf">EMF</a>
+</li>
+<li>
+<a href="#eps">EPS</a>
+</li>
+<li>
+<a href="#gif">GIF</a>
+</li>
+<li>
+<a href="#jpeg">JPEG</a>
+</li>
+<li>
+<a href="#png">PNG</a>
+</li>
+<li>
+<a href="#svg">SVG</a>
+<ul class="minitoc">
+<li>
+<a href="#svg-intro">Introduction</a>
+</li>
+<li>
+<a href="#svg-pdf-graphics">Placing SVG Graphics into PDF</a>
+</li>
+<li>
+<a href="#svg-pdf-text">Placing SVG Text into PDF and PostScript</a>
+</li>
+<li>
+<a href="#svg-font-selection">Font selection notes</a>
+</li>
+<li>
+<a href="#svg-scaling">Scaling</a>
+</li>
+<li>
+<a href="#svg-problems">Known Problems</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#tiff">TIFF</a>
+</li>
+<li>
+<a href="#wmf">WMF</a>
+</li>
+</ul>
+</li>
+<li>
+<a href="#resolution">Graphics Resolution</a>
+</li>
+<li>
+<a href="#page-selection">Page selection for multi-page formats</a>
+</li>
+<li>
+<a href="#caching">Image caching</a>
+</li>
+</ul>
+</div>
+    
+<a name="N10011"></a><a name="introduction"></a>
+<h2 class="underlined_10">Introduction</h2>
+<div class="section">
+<p>
+        Some noteworthy features of the image handling subsystem are:
+      </p>
+<ul>
+        
+<li>
+          The image libraries Jimi and JAI are not supported. Instead, Apache FOP uses the
+          Image I/O API that was introduced with Java 1.4 for all bitmap codecs.
+        </li>
+        
+<li>
+          Some bitmap images are not converted to a standardized 24 bit RGB image but are
+          instead handled in their native format.
+        </li>
+        
+<li>
+          A plug-in mechanism offers a possibility to add support for new formats without changing
+          the FOP's source code.
+        </li>
+      
+</ul>
+<p>
+        The actual <a href="http://xmlgraphics.apache.org/commons/image-loader.html">image loading framework</a>
+        does not reside in Apache FOP, but in
+        <a href="http://xmlgraphics.apache.org/commons/">XML Graphics Commons</a>.
+      </p>
+</div>
+    
+<a name="N10032"></a><a name="support-overview"></a>
+<h2 class="underlined_10">Overview of Graphics Support</h2>
+<div class="section">
+<p>
+        The table below summarizes the <em>theoretical</em> support for graphical formats
+        within FOP. In other words, within the constraints of the limitations listed here,
+        these formats <em>should</em> work. However, many of them have not been tested,
+        and there may be limitations that have not yet been discovered or documented.
+        The packages needed to support some formats are not included in the FOP distribution
+        and must be installed separately. Follow the links in the "Support Through" columns
+        for more details.
+      </p>
+<table class="ForrestTable" cellspacing="1" cellpadding="4">
+        
+<tr>
+          
+<th colspan="1" rowspan="2">Format</th>
+          <th colspan="1" rowspan="2">Type</th>
+          <th colspan="3" rowspan="1">Support Through</th>
+        
+</tr>
+        
+<tr>
+          
+<th colspan="1" rowspan="1"><a href="#native">Apache FOP (native)</a></th>
+          <th colspan="1" rowspan="1"><a href="#batik">Apache Batik</a></th>
+          <th colspan="1" rowspan="1"><a href="#imageio">Image I/O</a></th>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1"><a href="#bmp">BMP</a> (Microsoft Windows Bitmap)</td>
+          <td colspan="1" rowspan="1">bitmap</td>
+          <td colspan="1" rowspan="1"></td>
+          <td colspan="1" rowspan="1"></td>
+          <td colspan="1" rowspan="1">X [1]</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1"><a href="#emf">EMF</a> (Windows Enhanced Metafile)</td>
+          <td colspan="1" rowspan="1">vector (with embedded bitmaps)</td>
+          <td colspan="1" rowspan="1">(X)</td>
+          <td colspan="1" rowspan="1"></td>
+          <td colspan="1" rowspan="1"></td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1"><a href="#eps">EPS</a> (Encapsulated PostScript)</td>
+          <td colspan="1" rowspan="1">metafile (both bitmap and vector), most frequently used for vector drawings</td>
+          <td colspan="1" rowspan="1">(X)</td>
+          <td colspan="1" rowspan="1"></td>
+          <td colspan="1" rowspan="1"></td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1">GIF (Graphics Interchange Format)</td>
+          <td colspan="1" rowspan="1">bitmap</td>
+          <td colspan="1" rowspan="1"></td>
+          <td colspan="1" rowspan="1"></td>
+          <td colspan="1" rowspan="1">X</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1"><a href="#jpeg">JPEG</a> (Joint Photographic Experts Group)</td>
+          <td colspan="1" rowspan="1">bitmap</td>
+          <td colspan="1" rowspan="1">(X)</td>
+          <td colspan="1" rowspan="1"></td>
+          <td colspan="1" rowspan="1">X</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1"><a href="#png">PNG</a> (Portable Network Graphic)</td>
+          <td colspan="1" rowspan="1">bitmap</td>
+          <td colspan="1" rowspan="1"></td>
+          <td colspan="1" rowspan="1"></td>
+          <td colspan="1" rowspan="1">X</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1"><a href="#svg">SVG</a> (Scalable Vector Graphics)</td>
+          <td colspan="1" rowspan="1">vector (with embedded bitmaps)</td>
+          <td colspan="1" rowspan="1"></td>
+          <td colspan="1" rowspan="1">X</td>
+          <td colspan="1" rowspan="1"></td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1"><a href="#tiff">TIFF</a> (Tag Image Format File)</td>
+          <td colspan="1" rowspan="1">bitmap</td>
+          <td colspan="1" rowspan="1">(X)</td>
+          <td colspan="1" rowspan="1"></td>
+          <td colspan="1" rowspan="1">X [1]</td>
+        
+</tr>
+        
+<tr>
+          
+<td colspan="1" rowspan="1"><a href="#wmf">WMF</a> (Windows Metafile)</td>
+          <td colspan="1" rowspan="1">vector (with embedded bitmaps)</td>
+          <td colspan="1" rowspan="1"></td>
+          <td colspan="1" rowspan="1">(X)</td>
+          <td colspan="1" rowspan="1"></td>
+        
+</tr>
+      
+</table>
+<p>
+        Legend:
+      </p>
+<ul>
+        
+<li>"(X)" means restricted support. Please see the details below.</li>
+        
+<li>
+          [1]: Requires the presence of <a class="external" href="http://jai-imageio.dev.java.net/">JAI Image I/O Tools</a>
+          (or an equivalent Image I/O compatible codec) in the classpath. JAI Image I/O Tools also
+          adds support for JPEG 2000, WBMP, RAW and PNM. Other Image I/O codecs may provide
+          support for additional formats.
+        </li>
+      
+</ul>
+<div class="note">
+<div class="label">Note</div>
+<div class="content">
+        
+<a class="external" href="http://jai-imageio.dev.java.net/">JAI Image I/O Tools</a> is not the same as the
+        <a class="external" href="http://java.sun.com/javase/technologies/desktop/media/jai/">JAI library</a>! The
+        former simply exposes JAI's codecs using the Image&nbsp;I/O API but does not include all
+        the image manipulation functionality.
+      </div>
+</div>
+<a name="N1018D"></a><a name="format-map"></a>
+<h3 class="underlined_5">Map of supported image formats by output format</h3>
+<p>
+          Not all image formats are supported for all output formats! For example, while you can
+          use EPS (Encapsulated PostScript) files when you generate PostScript output, this format
+          will not be supported by any other output format. Here's an overview of which image
+          formats are supported by which output format:
+        </p>
+<table class="ForrestTable" cellspacing="1" cellpadding="4">
+          
+<tr>
+            
+<th colspan="1" rowspan="1">Image Format</th>
+            <th colspan="1" rowspan="1">PDF</th>
+            <th colspan="1" rowspan="1">PostScript</th>
+            <th colspan="1" rowspan="1">Java2D, PNG, TIFF, AWT</th>
+            <th colspan="1" rowspan="1">PCL</th>
+            <th colspan="1" rowspan="1">AFP</th>
+            <th colspan="1" rowspan="1">RTF</th>
+          
+</tr>
+          
+<tr>
+            
+<td colspan="1" rowspan="1"><a href="#bmp">BMP</a> (Microsoft Windows Bitmap)</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+          
+</tr>
+          
+<tr>
+            
+<td colspan="1" rowspan="1"><a href="#emf">EMF</a> (Windows Enhanced Metafile)</td>
+            <td colspan="1" rowspan="1"></td>
+            <td colspan="1" rowspan="1"></td>
+            <td colspan="1" rowspan="1"></td>
+            <td colspan="1" rowspan="1"></td>
+            <td colspan="1" rowspan="1"></td>
+            <td colspan="1" rowspan="1">X [1]</td>
+          
+</tr>
+          
+<tr>
+            
+<td colspan="1" rowspan="1"><a href="#eps">EPS</a> (Encapsulated PostScript)</td>
+            <td colspan="1" rowspan="1"></td>
+            <td colspan="1" rowspan="1">X [1]</td>
+            <td colspan="1" rowspan="1"></td>
+            <td colspan="1" rowspan="1"></td>
+            <td colspan="1" rowspan="1"></td>
+            <td colspan="1" rowspan="1"></td>
+          
+</tr>
+          
+<tr>
+            
+<td colspan="1" rowspan="1">GIF (Graphics Interchange Format)</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+          
+</tr>
+          
+<tr>
+            
+<td colspan="1" rowspan="1"><a href="#jpeg">JPEG</a> (Joint Photographic Experts Group)</td>
+            <td colspan="1" rowspan="1">X [1]</td>
+            <td colspan="1" rowspan="1">X [1]</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X [1]</td>
+            <td colspan="1" rowspan="1">X</td>
+          
+</tr>
+          
+<tr>
+            
+<td colspan="1" rowspan="1"><a href="#png">PNG</a> (Portable Network Graphic)</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+          
+</tr>
+          
+<tr>
+            
+<td colspan="1" rowspan="1"><a href="#svg">SVG</a> (Scalable Vector Graphics)</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+          
+</tr>
+          
+<tr>
+            
+<td colspan="1" rowspan="1"><a href="#tiff">TIFF</a> (Tag Image Format File)</td>
+            <td colspan="1" rowspan="1">X [2]</td>
+            <td colspan="1" rowspan="1">X [2]</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X [2]</td>
+            <td colspan="1" rowspan="1">X</td>
+          
+</tr>
+          
+<tr>
+            
+<td colspan="1" rowspan="1"><a href="#wmf">WMF</a> (Windows Metafile)</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+            <td colspan="1" rowspan="1">X</td>
+          
+</tr>
+        
+</table>
+<p>
+          Legend:
+        </p>
+<ul>
+          
+<li>
+            [1]: Supported without the need to decode the image.
+          </li>
+          
+<li>
+            [2]: Supported without the need to decode the image, but only for certain subtypes.
+          </li>
+        
+</ul>
+</div>
+    
+<a name="N10331"></a><a name="packages"></a>
+<h2 class="underlined_10">Graphics Packages</h2>
+<div class="section">
+<a name="N10337"></a><a name="native"></a>
+<h3 class="underlined_5">XML Graphics Commons Native</h3>
+<p>
+          
+<a href="http://xmlgraphics.apache.org/commons/">XML Graphics Commons</a> supports a number
+          of graphic file formats natively as basic functionality: all bitmap formats for which
+          there are Image I/O codecs available (JPEG, PNG, GIF, TIFF, etc.), EPS and EMF.
+        </p>
+<a name="N10345"></a><a name="fop-native"></a>
+<h3 class="underlined_5">FOP Native</h3>
+<p>
+          FOP has no native image plug-ins for the image loading framework of its own but currently
+          hosts the Batik-dependent SVG and WMF plug-ins until they can be moved to
+          <a href="http://xmlgraphics.apache.org/batik/">Apache Batik</a>.
+        </p>
+<a name="N10353"></a><a name="batik"></a>
+<h3 class="underlined_5">Apache Batik</h3>
+<p>
+          
+<a href="http://xmlgraphics.apache.org/batik/">Apache Batik</a> will later receive the
+          SVG and WMF plug-ins for the image loading framework that are currently hosted inside
+          FOP.
+        </p>
+<p>
+          Current FOP distributions include a distribution of the
+          <a target="_blank" class="fork" href="http://xmlgraphics.apache.org/batik/">Apache Batik</a>.
+          Because Batik's API changes frequently, it is highly recommended that you use the
+          version that ships with FOP, at least when running FOP.
+        </p>
+<div class="warning">
+<div class="label">Warning</div>
+<div class="content">Batik must be run in a graphical environment.</div>
+</div>
+<p>
+          Batik must be run in a graphical environment.
+          It uses AWT classes for rendering SVG, which in turn require an X server on Unixish
+          systems. If you run a server without X, or if you can't connect to the X server due to
+          security restrictions or policies (a so-called "headless" environment), SVG rendering
+          will fail.
+        </p>
+<p>Here are some workarounds:</p>
+<ul>
+          
+<li>
+            Start Java with the <span class="codefrag">-Djava.awt.headless=true</span> command line option.
+          </li>
+          
+<li>
+            Install an X server which provides an in-memory framebuffer without actually using a
+            screen device or any display hardware. One example is Xvfb.
+          </li>
+          
+<li>
+            Install a toolkit which emulates AWT without the need for an underlying X server. One
+            example is the <a class="external" href="http://www.eteks.com/pja/en">PJA toolkit</a>, which is free
+            and comes with detailed installation instructions.
+          </li>
+        
+</ul>
+<a name="N10385"></a><a name="imageio"></a>
+<h3 class="underlined_5">Image I/O</h3>
+<p>
+          The image loading framework in <a href="http://xmlgraphics.apache.org/commons/">XML Graphics Commons</a>
+          provides a wrapper to load images through the 
+          <a class="external" href="http://java.sun.com/j2se/1.4.2/docs/guide/imageio/index.html">JDK's Image I/O API</a> (JSR 015).
+          Image I/O allows to dynamically add additional image codecs. An example of such an
+          add-on library are the
+          <a class="external" href="http://java.sun.com/products/java-media/jai/">JAI Image I/O Tools</a>
+          available from Sun.
+        </p>
+</div>
+    
+<a name="N1039E"></a><a name="image-formats"></a>
+<h2 class="underlined_10">Details on image formats</h2>
+<div class="section">
+<a name="N103A4"></a><a name="bmp"></a>
+<h3 class="underlined_5">BMP</h3>
+<p>
+          BMP images are supported through an Image I/O codec. There may be limitations of the
+          codec which are outside the control of Apache FOP.
+        </p>
+<a name="N103AE"></a><a name="emf"></a>
+<h3 class="underlined_5">EMF</h3>
+<p>
+          Windows Enhanced Metafiles (EMF) are only supported in RTF output where they are
+          embedded without decoding.
+        </p>
+<a name="N103B8"></a><a name="eps"></a>
+<h3 class="underlined_5">EPS</h3>
+<p>Apache FOP allows to use EPS files when generating PostScript output only.</p>
+<p>
+          Other output targets can't be supported at the moment because
+          FOP lacks a PostScript interpreter. Furthermore, FOP is currently not able
+          to parse the preview bitmaps sometimes contained in EPS files.
+        </p>
+<a name="N103C5"></a><a name="gif"></a>
+<h3 class="underlined_5">GIF</h3>
+<p>
+          GIF images are supported through an Image&nbsp;I/O codec. Transparency is supported but
+          not guaranteed to work with every output format.
+        </p>
+<a name="N103CF"></a><a name="jpeg"></a>
+<h3 class="underlined_5">JPEG</h3>
+<p>
+          FOP native support (i.e. the handling of undecoded images) of JPEG does not include all
+          variants, especially those containing unusual color lookup tables and color profiles.
+          If you have trouble with a JPEG image in FOP, try opening it with an image processing 
+          program (such as Photoshop or Gimp) and then saving it. Specifying 24-bit color output 
+          may also help. For the PDF and PostScript renderers most JPEG images can be passed 
+          through without decompression. User reports indicate that grayscale, RGB, and 
+          CMYK color spaces are all rendered properly. However, for other output formats, the
+          JPEG images have to be decompressed. Tests have shown that there are some limitation
+          in some Image&nbsp;I/O codecs concerning images in the CMYK color space. Work-arounds are
+          in place but may not always work as expected.
+        </p>
+<a name="N103D9"></a><a name="png"></a>
+<h3 class="underlined_5">PNG</h3>
+<p>
+          PNG images are supported through an Image&nbsp;I/O codec. Transparency is supported but
+          not guaranteed to work with every output format.
+        </p>
+<a name="N103E3"></a><a name="svg"></a>
+<h3 class="underlined_5">SVG</h3>
+<a name="N103E9"></a><a name="svg-intro"></a>
+<h4>Introduction</h4>
+<p>FOP uses <a href="#batik"> Apache Batik</a> for SVG support.
+            This format can be handled as an <span class="codefrag">fo:instream-foreign-object</span> or in a separate
+            file referenced with <span class="codefrag">fo:external-graphic</span>.</p>
+<div class="note">
+<div class="label">Note</div>
+<div class="content">   
+            Batik's SVG Rasterizer utility may also be used to convert standalone SVG
+            documents into PDF.  For more information please see the
+            <a href="http://xmlgraphics.apache.org/batik/svgrasterizer.html">SVG Rasterizer documentation</a>
+            on the Batik site.
+          </div>
+</div>
+<a name="N10404"></a><a name="svg-pdf-graphics"></a>
+<h4>Placing SVG Graphics into PDF</h4>
+<p>
+            The SVG is rendered into PDF by using PDF commands to draw and fill
+            lines and curves. This means that the graphical objects created with
+            this remain as vector graphics. The same applies to PostScript output.
+            For other output formats the SVG graphic may be converted to a bitmap
+            image.
+          </p>
+<p>
+            There are a number of SVG things that cannot be converted directly into
+            PDF. Parts of the graphic such as effects, patterns and images are inserted
+            into the PDF as a raster graphic. The resolution of these raster images can
+            be controlled through the "target resolution" setting in the 
+            <a href="configuration.html">configuration</a>.</p>
+<p>
+            Currently transparency is limited in PDF so some SVG images that
+            contain effects or graphics with transparent areas may not be displayed
+            correctly.
+          </p>
+<a name="N10418"></a><a name="svg-pdf-text"></a>
+<h4>Placing SVG Text into PDF and PostScript</h4>
+<p>If possible, Batik will use normal PDF or PostScript text when inserting text. It does
+            this by checking if the text can be drawn normally and the font is
+            supported. This example svg <a href="../dev/svg/text.svg">text.svg</a> /
+            <a href="../dev/svg/text.pdf">text.pdf</a> / <a href="../dev/svg/text.png">text.png</a>
+            shows how various types and effects with text are handled.
+            Note that SVG font support is not yet implemented. Furthermore, text handling in
+            PostScript output is inferior to PDF output - more text will be painted as shapes in
+            PS than in PDF.
+          </p>
+<p>
+            When there's no support to paint text using native text operations,
+            text is converted and drawn as a set of shapes by Batik, using the
+            stroking text painter. This means that a typical character will
+            have about 10 curves (each curve consists of at least 20 characters).
+            This can make the output files large and when it is viewed the
+            viewer may not normally draw those fine curves very well (In Adobe Acrobat, turning on
+            "Smooth Line Art" in the preferences will fix this). Copy/paste functionality
+            will not be supported in this case.
+            If the text is inserted into the output file using the inbuilt text commands
+            it will use a single character.
+          </p>
+<p>
+            Note that because SVG text can be rendered as either text or a vector graphic, you 
+            may need to consider settings in your viewer for both. The Acrobat viewer has both 
+            "smooth line art" and "smooth text" settings that may need to be set for SVG images 
+            to be displayed nicely on your screen (see Edit / Preferences / Display).
+            This setting will not affect the printing of your document, which should be OK in 
+            any case, but will only affect the quality of the screen display.
+          </p>
+<a name="N10434"></a><a name="svg-font-selection"></a>
+<h4>Font selection notes</h4>
+<p>
+            Apache Batik uses the AWT/Java2D subsystem as font source while FOP has its own font
+            subsystem. Great care has been taken that font selection does the best possible choices.
+            But it must be noted when creating PDF or PostScript that a font used in SVG graphics
+            needs to be registered with the operating system as well as in FOP's configuration.
+            By using FOP's font auto-detection, you simply have to install the font in the operating
+            system and not care about anything else. This is less of an issue if you create
+            formats like TIFFs, PNGs or PCL because in these cases SVG graphics are usually rendered
+            to bitmaps which means that on both sides (Batik and FOP), AWT/Java2D is used as the
+            single font source.
+          </p>
+<p>
+            Whenever an SVG is converted into a PDF or PostScript file, the font that has been used
+            inside Batik has to be mapped to a font used by the actual output format. Features like
+            font substitution in FOP may need to be taken into account but can also be an advantage
+            when working around font mapping issues. Like for XSL-FO content, you'll get a warning
+            if a particular font could not be found and had to be substituted, or if a particular
+            glyph is missing in a font.
+          </p>
+<a name="N10441"></a><a name="svg-scaling"></a>
+<h4>Scaling</h4>
+<p>
+            Currently, SVG images are rendered with the dimensions specified <em>in the SVG 
+              file</em>, within the viewport specified in the fo:external-graphic element.
+            For everything to work properly, the two should be equal. The SVG standard leaves 
+            this issue as an implementation detail. Additional scaling options are available
+            through XSL-FO means.
+          </p>
+<p>
+            If you use pixels to specify the size of an SVG graphic the "source resolution" setting
+            in the <a href="configuration.html">configuration</a> will be used to determine the
+            size of a pixel. The use of pixels to specify sizes is discouraged as they may
+            be interpreted differently in different environments.
+          </p>
+<a name="N10455"></a><a name="svg-problems"></a>
+<h4>Known Problems</h4>
+<ul>
+            
+<li>
+              Soft mask transparency is combined with white so that it looks better
+              on PDF 1.3 viewers but this causes the soft mask to be slightly lighter
+              or darker on PDF 1.4 viewers.
+            </li>
+            
+<li>
+              There is some problem with a gradient inside a pattern which may cause a PDF
+              error when viewed in Acrobat 5.
+            </li>
+            
+<li>
+              Text is not always handled correctly, it may select the wrong font
+              especially if characters have multiple fonts in the font list.
+            </li>
+            
+<li>
+              Uniform transparency for images and other SVG elements that are converted
+              into a raster graphic are not drawn properly in PDF. The image is opaque.
+            </li>
+          
+</ul>
+<a name="N1046C"></a><a name="tiff"></a>
+<h3 class="underlined_5">TIFF</h3>
+<p>
+          FOP can embed TIFF images without decompression into PDF, PostScript and AFP if they
+          have either CCITT T.4, CCITT T.6, or JPEG compression. Otherwise, a TIFF-capable
+          Image&nbsp;I/O codec is necessary for decoding the image.
+        </p>
+<p>
+          There may be some limitation concerning images in the CMYK color space.
+        </p>
+<a name="N10479"></a><a name="wmf"></a>
+<h3 class="underlined_5">WMF</h3>
+<p>
+          Windows Metafiles (WMF) are supported through classes in 
+          <a href="http://xmlgraphics.apache.org/batik/">Apache Batik</a>. At the moment, support
+          for this format is experimental and may not always work as expected.
+        </p>
+</div>
+    
+<a name="N10488"></a><a name="resolution"></a>
+<h2 class="underlined_10">Graphics Resolution</h2>
+<div class="section">
+<p>
+        Some bitmapped image file formats store a dots-per-inch (dpi) or other resolution 
+        values. FOP tries to use this resolution information whenever possible to determine
+        the image's intrinsic size. This size is used during the layout process when it is not
+        superseded by an explicit size on fo:external-graphic (content-width and content-height 
+        properties).
+      </p>
+<p>
+        Please note that not all images contain resolution information. If it's not available
+        the source resolution set on the FopFactory (or through the user configuration XML) is used.
+        The default here is 72 dpi.
+      </p>
+<p>
+        Bitmap images are generally embedded into the output format at their original resolution
+        (as is). No resampling of the image is performed. Explicit resampling is on our wishlist, 
+        but hasn't been implemented, yet. Bitmaps included in SVG graphics may be resampled to 
+        the resolution specified in the "target resolution" setting in the 
+        <a href="configuration.html">configuration</a> if SVG filters are applied. This can be
+        used as a work-around to resample images in FO documents. 
+      </p>
+</div>
+    
+<a name="N1049C"></a><a name="page-selection"></a>
+<h2 class="underlined_10">Page selection for multi-page formats</h2>
+<div class="section">
+<p>
+        Some image formats such as TIFF support multiple pages/sub-images per file. You can
+        select a particular page using a special URI fragment in the form:
+        &lt;uri&gt;#page=&lt;nr&gt;
+        (for example: <span class="codefrag">http://localhost/images/myimage.tiff#page=3</span>)
+      </p>
+</div>
+    
+<a name="N104A9"></a><a name="caching"></a>
+<h2 class="underlined_10">Image caching</h2>
+<div class="section">
+<p>
+        FOP caches images between runs. There is one cache per FopFactory instance. The URI is 
+        used as a key to identify images which means that when a particular URI appears again, 
+        the image is taken from the cache. If you have a servlet that generates a different 
+        image each time it is called with the same URI you need to use a constantly 
+        changing dummy parameter on the URI to avoid caching.
+      </p>
+<p>
+        The image cache has been improved considerably in the redesigned code. Therefore,
+        resetting the image cache should be a thing of the past. If you 
+        still experience OutOfMemoryErrors, please notify us.
+      </p>
+<p>
+        If all else fails, the image cache can be cleared like this:
+        <span class="codefrag">fopFactory.getImageManager().getCache().clearCache();</span>
+      
+</p>
+</div>
+  
+<span class="version">
+          version 964711</span>
+</div>
+<!--+
+    |end content
+    +-->
+<div class="clearboth">&nbsp;</div>
+</div>
+<div id="footer">
+<!--+
+    |start bottomstrip
+    +-->
+<div class="lastmodified">
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<div class="copyright">
+        Copyright &copy;
+         1999-2009 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
+</div>
+<!--+
+    |end bottomstrip
+    +-->
+</div>
+</body>
+</html>

Propchange: xmlgraphics/site/deploy/fop/1.0/graphics.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/site/deploy/fop/1.0/graphics.html
------------------------------------------------------------------------------
    svn:keywords = Id



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Mime
View raw message