blob: 4cdbf7ab0b67beaf41173da18b6ce854d539ca3a [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
<!--
<link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/style.css">
-->
<link rel="stylesheet" type="text/css" media="screen" href="https://www.apache.org/css/code.css">
<link href="/css/profile.css" rel="stylesheet" type="text/css" />
<link href="/css/xmlgraphics.css" rel="stylesheet" type="text/css" />
<link href="/css/print.css" rel="stylesheet" type="text/css" media="print" />
<script src="https://code.jquery.com/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery.stoc.js"></script>
<script>
$(document).ready(function(){
$('ul#navigation a').each(function() {
if (this.href === window.location.href)
{ $(this). attr('id', 'forefront');}
});
$('ul#navigation a#forefront').each(function() {
});
})
$(function(){
$("#items").stoc({ search: "#content", stocTitle: "<h3>Page Contents</h3>" });
});
</script>
<style>
.highlight {color: red;}
</style>
</head>
<body>
<div id="banner">&nbsp;
</div>
<div id="navigation">
<style type="text/css">
/* The following code is added by mdx_elementid.py
It was originally lifted from http://subversion.apache.org/style/site.css */
/*
* Hide class="elementid-permalink", except when an enclosing heading
* has the :hover property.
*/
.headerlink, .elementid-permalink {
visibility: hidden;
}
h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style>
<p><a href="/"><img alt="Apache XML Graphics Project Logo" src="/images/apache-xml-graphics.gif" title="Apache XML Graphics Project" /></a></p>
<h1 id="apache-fop">Apache&trade; FOP<a class="headerlink" href="#apache-fop" title="Permanent link">&para;</a></h1>
<ul>
<li><a href="/fop/">FOP Home</a></li>
<li><a href="/fop/download.html">Download</a></li>
<li><a href="/fop/quickstartguide.html">Quick Start Guide</a></li>
<li><a href="/fop/compliance.html">Compliance</a></li>
<li><a href="/fop/gethelp.html">Getting Help</a></li>
<li><a href="/fop/faq.html">FAQs</a></li>
<li><a href="https://cwiki.apache.org/confluence/display/XMLGRAPHICSFOP">FOP Wiki</a></li>
<li><a href="/fop/maillist.html">Mailing Lists</a></li>
<li><a href="/fop/license.html">License</a></li>
<li>
<h2 id="resources">Resources<a class="headerlink" href="#resources" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/fo.html">XSL-FO</a></li>
<li><a href="/fop/examples.html">Examples</a></li>
<li><a href="/fop/bugs.html">Bugs</a></li>
<li><a href="https://cwiki.apache.org/confluence/display/XMLGRAPHICSFOP/FrontPage">Wiki</a></li>
<li><a href="/fop/resources.html">Other</a></li>
</ul>
</li>
<li>
<h2 id="project">Project<a class="headerlink" href="#project" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/news.html">News</a></li>
<li><a href="/fop/team.html">Who We Are</a></li>
<li><a href="/fop/status.html">Status</a></li>
<li><a href="/fop/knownissues.html">Known Issues</a></li>
<li><a href="/fop/changes.html">Changes</a></li>
</ul>
</li>
<li>
<h2 id="versions">Versions<a class="headerlink" href="#versions" title="Permanent link">&para;</a></h2>
<ul>
<li>
<h2 id="fop-trunk-dev">FOP Trunk (dev)<a class="headerlink" href="#fop-trunk-dev" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/trunk/">Overview</a></li>
<li><a href="/fop/trunk/upgrading.html">Upgrading</a></li>
<li>
<h3 id="using-apache-fop">Using Apache&trade; FOP<a class="headerlink" href="#using-apache-fop" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/trunk/compiling.html">Build</a></li>
<li><a href="/fop/trunk/configuration.html">Configure</a></li>
<li><a href="/fop/trunk/running.html">Run</a></li>
<li><a href="/fop/trunk/embedding.html">Embed</a></li>
<li><a href="/fop/trunk/servlets.html">Servlets</a></li>
<li><a href="/fop/trunk/anttask.html">Ant Task</a></li>
</ul>
</li>
<li>
<h3 id="features">Features<a class="headerlink" href="#features" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/trunk/accessibility.html">Accessibility</a></li>
<li><a href="/fop/trunk/complexscripts.html">Complex Scripts</a></li>
<li><a href="/fop/trunk/events.html">Events</a></li>
<li><a href="/fop/trunk/extensions.html">Extensions</a></li>
<li><a href="/fop/trunk/fonts.html">Fonts</a></li>
<li><a href="/fop/trunk/graphics.html">Graphics</a></li>
<li><a href="/fop/trunk/hyphenation.html">Hyphenation</a></li>
<li><a href="/fop/trunk/intermediate.html">Intermediate Format</a></li>
<li><a href="/fop/trunk/metadata.html">Metadata</a></li>
<li><a href="/fop/trunk/output.html">Output Targets</a></li>
<li><a href="/fop/trunk/pdfa.html">PDF/A</a></li>
<li><a href="/fop/trunk/pdfx.html">PDF/X</a></li>
<li><a href="/fop/trunk/pdfencryption.html">PDF Encryption</a></li>
<li><a href="/fop/fop-pdf-images.html">PDF Images</a></li>
<li><a href="/fop/trunk/whitespacemanagement.html">Whitespace Management</a></li>
</ul>
</li>
</ul>
</li>
<li>
<h2 id="fop-25">FOP 2.5<a class="headerlink" href="#fop-25" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/2.5/">FOP 2.5 Overview</a></li>
<li><a href="/fop/2.5/releaseNotes_2.5.html">Release Notes</a></li>
<li><a href="/fop/2.5/changes_2.5.html">Changes (2.5)</a></li>
<li><a href="/fop/2.5/knownissues_overview.html">Known Issues</a></li>
<li><a href="/fop/2.5/upgrading.html">Upgrading</a></li>
<li>
<h3 id="using-apache-fop-25">Using Apache FOP 2.5<a class="headerlink" href="#using-apache-fop-25" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/2.5/compiling.html">Build</a></li>
<li><a href="/fop/2.5/configuration.html">Configure</a></li>
<li><a href="/fop/2.5/running.html">Run</a></li>
<li><a href="/fop/2.5/embedding.html">Embed</a></li>
<li><a href="/fop/2.5/servlets.html">Servlets</a></li>
<li><a href="/fop/2.5/anttask.html">Ant Task</a></li>
</ul>
</li>
<li>
<h3 id="features_1">Features<a class="headerlink" href="#features_1" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/2.5/accessibility.html">Accessibility</a></li>
<li><a href="/fop/2.5/complexscripts.html">Complex Scripts</a></li>
<li><a href="/fop/2.5/events.html">Events</a></li>
<li><a href="/fop/2.5/extensions.html">Extensions</a></li>
<li><a href="/fop/2.5/fonts.html">Fonts</a></li>
<li><a href="/fop/2.5/graphics.html">Graphics</a></li>
<li><a href="/fop/2.5/hyphenation.html">Hyphenation</a></li>
<li><a href="/fop/2.5/intermediate.html">Intermediate Format</a></li>
<li><a href="/fop/2.5/metadata.html">Metadata</a></li>
<li><a href="/fop/2.5/output.html">Output Targets</a></li>
<li><a href="/fop/2.5/pdfa.html">PDF/A</a></li>
<li><a href="/fop/2.5/pdfx.html">PDF/X</a></li>
<li><a href="/fop/2.5/pdfencryption.html">PDF Encryption</a></li>
<li><a href="/fop/fop-pdf-images.html">PDF Images</a></li>
<li><a href="/fop/2.5/whitespacemanagement.html">Whitespace Management</a> </li>
</ul>
</li>
</ul>
</li>
<li>
<h2 id="fop-24">FOP 2.4<a class="headerlink" href="#fop-24" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/2.4/">FOP 2.4 Overview</a></li>
<li><a href="/fop/2.4/releaseNotes_2.4.html">Release Notes</a></li>
<li><a href="/fop/2.4/changes_2.4.html">Changes (2.4)</a></li>
<li><a href="/fop/2.4/knownissues_overview.html">Known Issues</a></li>
<li><a href="/fop/2.4/upgrading.html">Upgrading</a></li>
<li>
<h3 id="using-apache-fop-24">Using Apache FOP 2.4<a class="headerlink" href="#using-apache-fop-24" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/2.4/compiling.html">Build</a></li>
<li><a href="/fop/2.4/configuration.html">Configure</a></li>
<li><a href="/fop/2.4/running.html">Run</a></li>
<li><a href="/fop/2.4/embedding.html">Embed</a></li>
<li><a href="/fop/2.4/servlets.html">Servlets</a></li>
<li><a href="/fop/2.4/anttask.html">Ant Task</a></li>
</ul>
</li>
<li>
<h3 id="features_2">Features<a class="headerlink" href="#features_2" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/2.4/accessibility.html">Accessibility</a></li>
<li><a href="/fop/2.4/complexscripts.html">Complex Scripts</a></li>
<li><a href="/fop/2.4/events.html">Events</a></li>
<li><a href="/fop/2.4/extensions.html">Extensions</a></li>
<li><a href="/fop/2.4/fonts.html">Fonts</a></li>
<li><a href="/fop/2.4/graphics.html">Graphics</a></li>
<li><a href="/fop/2.4/hyphenation.html">Hyphenation</a></li>
<li><a href="/fop/2.4/intermediate.html">Intermediate Format</a></li>
<li><a href="/fop/2.4/metadata.html">Metadata</a></li>
<li><a href="/fop/2.4/output.html">Output Targets</a></li>
<li><a href="/fop/2.4/pdfa.html">PDF/A</a></li>
<li><a href="/fop/2.4/pdfx.html">PDF/X</a></li>
<li><a href="/fop/2.4/pdfencryption.html">PDF Encryption</a></li>
<li><a href="/fop/fop-pdf-images.html">PDF Images</a></li>
<li><a href="/fop/2.4/whitespacemanagement.html">Whitespace Management</a> </li>
</ul>
</li>
</ul>
</li>
<li>
<h2 id="fop-23">FOP 2.3<a class="headerlink" href="#fop-23" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/2.3/">FOP 2.3 Overview</a></li>
<li><a href="/fop/2.3/releaseNotes_2.3.html">Release Notes</a></li>
<li><a href="/fop/2.3/changes_2.3.html">Changes (2.3)</a></li>
<li><a href="/fop/2.3/knownissues_overview.html">Known Issues</a></li>
<li><a href="/fop/2.3/upgrading.html">Upgrading</a></li>
<li>
<h3 id="using-apache-fop-23">Using Apache FOP 2.3<a class="headerlink" href="#using-apache-fop-23" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/2.3/compiling.html">Build</a></li>
<li><a href="/fop/2.3/configuration.html">Configure</a></li>
<li><a href="/fop/2.3/running.html">Run</a></li>
<li><a href="/fop/2.3/embedding.html">Embed</a></li>
<li><a href="/fop/2.3/servlets.html">Servlets</a></li>
<li><a href="/fop/2.3/anttask.html">Ant Task</a></li>
</ul>
</li>
<li>
<h3 id="features_3">Features<a class="headerlink" href="#features_3" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/2.3/accessibility.html">Accessibility</a></li>
<li><a href="/fop/2.3/complexscripts.html">Complex Scripts</a></li>
<li><a href="/fop/2.3/events.html">Events</a></li>
<li><a href="/fop/2.3/extensions.html">Extensions</a></li>
<li><a href="/fop/2.3/fonts.html">Fonts</a></li>
<li><a href="/fop/2.3/graphics.html">Graphics</a></li>
<li><a href="/fop/2.3/hyphenation.html">Hyphenation</a></li>
<li><a href="/fop/2.3/intermediate.html">Intermediate Format</a></li>
<li><a href="/fop/2.3/metadata.html">Metadata</a></li>
<li><a href="/fop/2.3/output.html">Output Targets</a></li>
<li><a href="/fop/2.3/pdfa.html">PDF/A</a></li>
<li><a href="/fop/2.3/pdfx.html">PDF/X</a></li>
<li><a href="/fop/2.3/pdfencryption.html">PDF Encryption</a></li>
<li><a href="/fop/fop-pdf-images.html">PDF Images</a></li>
<li><a href="/fop/2.3/whitespacemanagement.html">Whitespace Management</a> </li>
</ul>
</li>
</ul>
</li>
<li>
<h2 id="fop-22">FOP 2.2<a class="headerlink" href="#fop-22" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/2.2/">FOP 2.2 Overview</a></li>
<li><a href="/fop/2.2/releaseNotes_2.2.html">Release Notes</a></li>
<li><a href="/fop/2.2/changes_2.2.html">Changes (2.2)</a></li>
<li><a href="/fop/2.2/knownissues_overview.html">Known Issues</a></li>
<li><a href="/fop/2.2/upgrading.html">Upgrading</a></li>
<li>
<h3 id="using-apache-fop-22">Using Apache FOP 2.2<a class="headerlink" href="#using-apache-fop-22" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/2.2/compiling.html">Build</a></li>
<li><a href="/fop/2.2/configuration.html">Configure</a></li>
<li><a href="/fop/2.2/running.html">Run</a></li>
<li><a href="/fop/2.2/embedding.html">Embed</a></li>
<li><a href="/fop/2.2/servlets.html">Servlets</a></li>
<li><a href="/fop/2.2/anttask.html">Ant Task</a></li>
</ul>
</li>
<li>
<h3 id="features_4">Features<a class="headerlink" href="#features_4" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/2.2/accessibility.html">Accessibility</a></li>
<li><a href="/fop/2.2/complexscripts.html">Complex Scripts</a></li>
<li><a href="/fop/2.2/events.html">Events</a></li>
<li><a href="/fop/2.2/extensions.html">Extensions</a></li>
<li><a href="/fop/2.2/fonts.html">Fonts</a></li>
<li><a href="/fop/2.2/graphics.html">Graphics</a></li>
<li><a href="/fop/2.2/hyphenation.html">Hyphenation</a></li>
<li><a href="/fop/2.2/intermediate.html">Intermediate Format</a></li>
<li><a href="/fop/2.2/metadata.html">Metadata</a></li>
<li><a href="/fop/2.2/output.html">Output Targets</a></li>
<li><a href="/fop/2.2/pdfa.html">PDF/A</a></li>
<li><a href="/fop/2.2/pdfx.html">PDF/X</a></li>
<li><a href="/fop/2.2/pdfencryption.html">PDF Encryption</a></li>
<li><a href="/fop/fop-pdf-images.html">PDF Images</a></li>
<li><a href="/fop/2.2/whitespacemanagement.html">Whitespace Management</a></li>
</ul>
</li>
</ul>
</li>
<li>
<h2 id="fop-21">FOP 2.1<a class="headerlink" href="#fop-21" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/2.1/">FOP 2.1 Overview</a></li>
<li><a href="/fop/2.1/releaseNotes_2.1.html">Release Notes</a></li>
<li><a href="/fop/2.1/changes_2.1.html">Changes (2.1)</a></li>
<li><a href="/fop/2.1/knownissues_overview.html">Known Issues</a></li>
<li><a href="/fop/2.1/upgrading.html">Upgrading</a></li>
<li>
<h3 id="using-apache-fop-21">Using Apache FOP 2.1<a class="headerlink" href="#using-apache-fop-21" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/2.1/compiling.html">Build</a></li>
<li><a href="/fop/2.1/configuration.html">Configure</a></li>
<li><a href="/fop/2.1/running.html">Run</a></li>
<li><a href="/fop/2.1/embedding.html">Embed</a></li>
<li><a href="/fop/2.1/servlets.html">Servlets</a></li>
<li><a href="/fop/2.1/anttask.html">Ant Task</a></li>
</ul>
</li>
<li>
<h3 id="features_5">Features<a class="headerlink" href="#features_5" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/2.1/accessibility.html">Accessibility</a></li>
<li><a href="/fop/2.1/complexscripts.html">Complex Scripts</a></li>
<li><a href="/fop/2.1/events.html">Events</a></li>
<li><a href="/fop/2.1/extensions.html">Extensions</a></li>
<li><a href="/fop/2.1/fonts.html">Fonts</a></li>
<li><a href="/fop/2.1/graphics.html">Graphics</a></li>
<li><a href="/fop/2.1/hyphenation.html">Hyphenation</a></li>
<li><a href="/fop/2.1/intermediate.html">Intermediate Format</a></li>
<li><a href="/fop/2.1/metadata.html">Metadata</a></li>
<li><a href="/fop/2.1/output.html">Output Targets</a></li>
<li><a href="/fop/2.1/pdfa.html">PDF/A</a></li>
<li><a href="/fop/2.1/pdfx.html">PDF/X</a></li>
<li><a href="/fop/2.1/pdfencryption.html">PDF Encryption</a></li>
<li><a href="/fop/fop-pdf-images.html">PDF Images</a></li>
<li><a href="/fop/2.1/whitespacemanagement.html">Whitespace Management</a></li>
</ul>
</li>
</ul>
</li>
<li>
<h2 id="fop-20">FOP 2.0<a class="headerlink" href="#fop-20" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/2.0/">FOP 2.0 Overview</a></li>
<li><a href="/fop/2.0/releaseNotes_2.0.html">Release Notes</a></li>
<li><a href="/fop/2.0/changes_2.0.html">Changes (2.0)</a></li>
<li><a href="/fop/2.0/knownissues_overview.html">Known Issues</a></li>
<li><a href="/fop/2.0/upgrading.html">Upgrading</a></li>
<li>
<h3 id="using-apache-fop-20">Using Apache FOP 2.0<a class="headerlink" href="#using-apache-fop-20" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/2.0/compiling.html">Build</a></li>
<li><a href="/fop/2.0/configuration.html">Configure</a></li>
<li><a href="/fop/2.0/running.html">Run</a></li>
<li><a href="/fop/2.0/embedding.html">Embed</a></li>
<li><a href="/fop/2.0/servlets.html">Servlets</a></li>
<li><a href="/fop/2.0/anttask.html">Ant Task</a></li>
</ul>
</li>
<li>
<h3 id="features_6">Features<a class="headerlink" href="#features_6" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/2.0/accessibility.html">Accessibility</a></li>
<li><a href="/fop/2.0/complexscripts.html">Complex Scripts</a></li>
<li><a href="/fop/2.0/events.html">Events</a></li>
<li><a href="/fop/2.0/extensions.html">Extensions</a></li>
<li><a href="/fop/2.0/fonts.html">Fonts</a></li>
<li><a href="/fop/2.0/graphics.html">Graphics</a></li>
<li><a href="/fop/2.0/hyphenation.html">Hyphenation</a></li>
<li><a href="/fop/2.0/intermediate.html">Intermediate Format</a></li>
<li><a href="/fop/2.0/metadata.html">Metadata</a></li>
<li><a href="/fop/2.0/output.html">Output Targets</a></li>
<li><a href="/fop/2.0/pdfa.html">PDF/A</a></li>
<li><a href="/fop/2.0/pdfx.html">PDF/X</a></li>
<li><a href="/fop/2.0/pdfencryption.html">PDF Encryption</a></li>
<li><a href="/fop/fop-pdf-images.html">PDF Images</a></li>
<li><a href="/fop/2.0/whitespacemanagement.html">Whitespace Management</a></li>
</ul>
</li>
</ul>
</li>
<li>
<h2 id="fop-11">FOP 1.1<a class="headerlink" href="#fop-11" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/1.1/">FOP 1.1 Overview</a></li>
<li><a href="/fop/1.1/releaseNotes_1.1.html">Release Notes</a></li>
<li><a href="/fop/1.1/changes_1.1.html">Changes (1.1)</a></li>
<li><a href="/fop/1.1/knownissues_overview.html">Known Issues</a></li>
<li><a href="/fop/1.1/upgrading.html">Upgrading</a></li>
<li>
<h3 id="using-apache-fop-11">Using Apache FOP 1.1<a class="headerlink" href="#using-apache-fop-11" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/1.1/compiling.html">Build</a></li>
<li><a href="/fop/1.1/configuration.html">Configure</a></li>
<li><a href="/fop/1.1/running.html">Run</a></li>
<li><a href="/fop/1.1/embedding.html">Embed</a></li>
<li><a href="/fop/1.1/servlets.html">Servlets</a></li>
<li><a href="/fop/1.1/anttask.html">Ant Task</a></li>
</ul>
</li>
<li>
<h3 id="features_7">Features<a class="headerlink" href="#features_7" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/1.1/accessibility.html">Accessibility</a></li>
<li><a href="/fop/1.1/complexscripts.html">Complex Scripts</a></li>
<li><a href="/fop/1.1/events.html">Events</a></li>
<li><a href="/fop/1.1/extensions.html">Extensions</a></li>
<li><a href="/fop/1.1/fonts.html">Fonts</a></li>
<li><a href="/fop/1.1/graphics.html">Graphics</a></li>
<li><a href="/fop/1.1/hyphenation.html">Hyphenation</a></li>
<li><a href="/fop/1.1/intermediate.html">Intermediate Format</a></li>
<li><a href="/fop/1.1/metadata.html">Metadata</a></li>
<li><a href="/fop/1.1/output.html">Output Targets</a></li>
<li><a href="/fop/1.1/pdfa.html">PDF/A</a></li>
<li><a href="/fop/1.1/pdfx.html">PDF/X</a></li>
<li><a href="/fop/1.1/pdfencryption.html">PDF Encryption</a></li>
</ul>
</li>
</ul>
</li>
<li>
<h2 id="fop-10">FOP 1.0<a class="headerlink" href="#fop-10" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/1.0/">FOP 1.0 Overview</a></li>
<li><a href="/fop/1.0/releaseNotes_1.0.html">Release Notes</a></li>
<li><a href="/fop/1.0/changes_1.0.html">Changes (1.0)</a></li>
<li><a href="/fop/1.0/knownissues_overview.html">Known Issues</a></li>
<li><a href="/fop/1.0/upgrading.html">Upgrading</a></li>
<li>
<h3 id="using-apache-fop-10">Using Apache FOP 1.0<a class="headerlink" href="#using-apache-fop-10" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/1.0/compiling.html">Build</a></li>
<li><a href="/fop/1.0/configuration.html">Configure</a></li>
<li><a href="/fop/1.0/running.html">Run</a></li>
<li><a href="/fop/1.0/embedding.html">Embed</a></li>
<li><a href="/fop/1.0/servlets.html">Servlets</a></li>
<li><a href="/fop/1.0/anttask.html">Ant Task</a></li>
</ul>
</li>
<li>
<h3 id="features_8">Features<a class="headerlink" href="#features_8" title="Permanent link">&para;</a></h3>
<ul>
<li><a href="/fop/1.0/output.html">Output Targets</a></li>
<li><a href="/fop/1.0/intermediate.html">Intermediate Format</a></li>
<li><a href="/fop/1.0/pdfencryption.html">PDF Encryption</a></li>
<li><a href="/fop/1.0/pdfa.html">PDF/A</a></li>
<li><a href="/fop/1.0/pdfx.html">PDF/X</a></li>
<li><a href="/fop/1.0/graphics.html">Graphics</a></li>
<li><a href="/fop/1.0/fonts.html">Fonts</a></li>
<li><a href="/fop/1.0/hyphenation.html">Hyphenation</a></li>
<li><a href="/fop/1.0/extensions.html">Extensions</a></li>
<li><a href="/fop/1.0/events.html">Events</a></li>
<li><a href="/fop/1.0/metadata.html">Metadata</a></li>
<li><a href="/fop/1.0/accessibility.html">Accessibility</a></li>
</ul>
</li>
</ul>
</li>
<li>
<h2 id="fop-development">FOP Development<a class="headerlink" href="#fop-development" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/dev/">General Info</a></li>
<li>
<h2 id="design">Design<a class="headerlink" href="#design" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/dev/design/">Design Info</a></li>
</ul>
</li>
<li>
<h2 id="core-process">Core Process<a class="headerlink" href="#core-process" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/dev/design/startup.html">Startup</a></li>
<li><a href="/fop/dev/design/parsing.html">XML Parsing</a></li>
<li><a href="/fop/dev/design/fotree.html">FO Tree</a></li>
<li><a href="/fop/dev/design/properties.html">Properties</a></li>
<li><a href="/fop/dev/design/layout.html">Layout</a></li>
<li><a href="/fop/dev/design/breakpos.html">Break Possibility</a></li>
<li><a href="/fop/dev/design/areas.html">Area Tree</a></li>
<li><a href="/fop/dev/design/renderers.html">Renderers</a></li>
</ul>
</li>
<li>
<h2 id="miscellaneous">Miscellaneous<a class="headerlink" href="#miscellaneous" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/dev/design/images.html">Images</a></li>
<li><a href="/fop/dev/design/pdf-library.html">PDF Library</a></li>
<li><a href="/fop/dev/design/svg.html">SVG</a></li>
<li><a href="/fop/dev/design/embedding.html">Embedding</a></li>
<li><a href="/fop/dev/design/extending.html">Extending</a></li>
<li><a href="/fop/dev/design/optimise.html">Optimisations</a></li>
<li><a href="/fop/dev/design/useragent.html">User Agent</a></li>
</ul>
</li>
<li><a href="https://cwiki.apache.org/confluence/display/XMLGRAPHICSFOP/FOPProjectPages">Unresolved (Wiki)</a></li>
<li><a href="/fop/dev/svg.html">SVG</a></li>
<li><a href="/fop/dev/extensions.html">Extensions</a></li>
<li>
<h2 id="develop">Develop<a class="headerlink" href="#develop" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/dev/implement.html">Walk-Thru</a></li>
<li><a href="https://issues.apache.org/jira/issues/?jql=project%20%3D%20FOP%20AND%20description%20~%20%22\%22[patch]\%22%22%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29">Patch Queue</a></li>
<li><a href="/fop/dev/conventions.html">Conventions</a></li>
</ul>
</li>
<li>
<h2 id="test">Test<a class="headerlink" href="#test" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/dev/testing.html">Testing</a></li>
</ul>
</li>
<li>
<h2 id="deploy">Deploy<a class="headerlink" href="#deploy" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/dev/doc.html">Doc Mgmt</a></li>
<li><a href="/fop/dev/release.html">Release</a></li>
<li><a href="https://issues.apache.org/jira/issues/?jql=project%20%3D%20FOP%20AND%20issuetype%20%3D%20Bug%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29">Bugs</a></li>
</ul>
</li>
<li>
<h2 id="resources_1">Resources<a class="headerlink" href="#resources_1" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/dev/faq.html">FAQs</a></li>
<li><a href="/fop/dev/tools.html">Tools</a></li>
<li><a href="http://svn.apache.org/viewvc/xmlgraphics/fop">ViewVC</a></li>
</ul>
</li>
<li>
<h2 id="subpackages">SubPackages<a class="headerlink" href="#subpackages" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/fop/dev/rtflib.html">RTFlib</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<h1 id="apache-xml-graphics">Apache&trade; XML Graphics<a class="headerlink" href="#apache-xml-graphics" title="Permanent link">&para;</a></h1>
<ul>
<li>
<h2 id="project-overview">Project Overview<a class="headerlink" href="#project-overview" title="Permanent link">&para;</a></h2>
<ul>
<li><a href="/team.html">Who We Are</a></li>
<li><a href="/legal.html">Legal Stuff</a></li>
<li><a href="/charter.html">Project Charter</a></li>
<li><a href="/mail.html">Mailing Lists</a></li>
<li><a href="/repo.html">Code Repositories</a></li>
<li><a href="https://www.apache.org/foundation/sponsorship.html">ASF Sponsorship Program</a></li>
<li><a href="https://www.apache.org/foundation/thanks.html">ASF Thanks</a></li>
<li><a href="https://www.apache.org/licenses/">Licenses</a></li>
<li><a href="/security.html">Apache XML Graphics Security</a></li>
<li><a href="https://www.apache.org/security/">ASF Security</a></li>
</ul>
</li>
</ul>
<h1 id="sub-projects">Sub Projects<a class="headerlink" href="#sub-projects" title="Permanent link">&para;</a></h1>
<ul>
<li><a href="/batik/">Apache Batik</a></li>
<li><a href="/commons/">Apache XML Graphics Commons</a></li>
</ul>
<h3 id="search-apache-xml-graphics">Search Apache XML Graphics<a class="headerlink" href="#search-apache-xml-graphics" title="Permanent link">&para;</a></h3>
<form name="search" id="search" action="https://www.google.com/search" method="get">
<input value="xmlgraphics.apache.org" name="sitesearch" type="hidden"/>
<input type="text" name="q" id="query" />
<input type="submit" id="submit" value="Search" />
</form>
<h3 id="apachecon-n-america">ApacheCon N. America<a class="headerlink" href="#apachecon-n-america" title="Permanent link">&para;</a></h3>
<p><a title="ApacheCon North America" href="https://www.apachecon.com"><img class="apachecon_logo" alt="ApacheCon North America" src="https://www.apachecon.com/images/landingpage/apachecon-logo.png" width="200" /></a><br /><br /></p>
<ul>
<li><strong><a href="https://www.apachecon.com/">ApacheCon NA</a></strong></li>
</ul>
<p>Hope to see you there!</p>
<h3 id="apachecon-europe">ApacheCon Europe<a class="headerlink" href="#apachecon-europe" title="Permanent link">&para;</a></h3>
<p><a title="ApacheCon Europe" href="https://www.apachecon.com"><img class="apachecon_logo" alt="ApacheCon Europe" src="https://www.apachecon.com/images/landingpage/apachecon-logo.png" width="200" /></a><br /><br /></p>
<ul>
<li><strong><a href="https://www.apachecon.com/">ApacheCon Europe</a></strong></li>
</ul>
<p>Hope to see you there!</p>
<p><a title="Apache Software Foundation" href="https://www.apache.org"><img id="asf_logo_url" alt="Apache Software Foundation " src="/images/asf_logo_url.png" width="200" /></a><br /><br /></p>
<p><a title="Support the Apache Software Foundation" href="https://donate.apache.org/"><img id="asf_support_url" alt="Support the Apache Software Foundation " src="https://blogs.apache.org/foundation/mediaresource/d67ca611-a57c-462d-ac23-95063f81d175" width="200" /></a></p>
<script>
$(document).ready(function () {
$('#navigation :header').click(function () {
var text = $(this).siblings('ul');
if (text.is(':hidden')) {
text.slideDown('200');
} else {
text.slideUp('200');
}
});
if ($('#navigation :header').siblings('ul')) {
$('#navigation :header').not('#search-apache-xml-graphics, #apachewzxhzdk3-xml-graphics, #sub-projects').append(' &raquo;');
}
$('#navigation > ul > li > ul > li ul').hide();
$('#project-overview').next().hide();
$('#versions').next().show();
var str=location.href.toLowerCase();
$("#navigation li a").each(function() {
if (str.indexOf(this.href.toLowerCase()) > -1) {
$(this).parents().slideDown('200');
$("li.highlight").removeClass("highlight");
$(this).parent().addClass("highlight");
}
});
})
</script> </div>
<div id="bannertext" style="border-bottom: 2px dashed #666666; height: 70px;">
<a href="/fop/"><img src="/images/apache-fop-logo.jpg" alt="The Apache FOP Project" width="120" height="65" style="float:left; margin-right: 15px;" /></a>
<h2>The Apache&trade; FOP Project</h2>
</div>
<h1>Apache(tm) FOP: Fonts</h1>
Translations:
<a href="/fop/2.0/fonts.html">en</a>
<a href="/fop/0.95/fonts.html">en</a>
<a href="/fop/2.5/fonts.html">en</a>
<a href="/fop/trunk/fonts.html">en</a>
<a href="/fop/1.1/fonts.html">en</a>
<a href="/fop/2.2/fonts.html">en</a>
<a href="/fop/2.1/fonts.html">en</a>
<a href="/fop/2.3/fonts.html">en</a>
<a href="/fop/2.4/fonts.html">en</a>
<h1>Apache&trade; FOP: Fonts</h1>
<p><authors><person email="" name="Jeremias Märki"></person><person email="" name="Tore Engvig"></person><person email="" name="Adrian Cumiskey"></person><person email="" name="Max Berger"></person></authors></p>
<h2 id="intro">Summary</h2>
<p>The following table summarizes the font capabilities of the various Apache&trade; FOP renderers:</p>
<table>
<thead>
<tr>
<th>Renderer</th>
<th>Base-14</th>
<th>AWT/OS</th>
<th>Custom</th>
<th>Custom Embedding</th>
</tr>
</thead>
<tbody>
<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>yes</td>
</tr>
<tr>
<td>PCL</td>
<td>yes (modified)</td>
<td>yes (painted as bitmaps)</td>
<td>yes (painted as bitmaps)</td>
<td>no</td>
</tr>
<tr>
<td>AFP</td>
<td>no</td>
<td>no</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td>Java2D/AWT/Bitmap</td>
<td>if available from OS</td>
<td>yes</td>
<td>yes</td>
<td>n/a (display only)</td>
</tr>
<tr>
<td>Print</td>
<td>if available from OS</td>
<td>yes</td>
<td>yes</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>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>XML</td>
<td>yes</td>
<td>no</td>
<td>yes</td>
<td>n/a</td>
</tr>
</tbody>
</table>
<h2 id="Base-14-Fonts">Base-14 Fonts</h2>
<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>
<thead>
<tr>
<th>Base-14 font</th>
<th>font families</th>
</tr>
</thead>
<tbody>
<tr>
<td>Helvetica</td>
<td>Helvetica, sans-serif, SansSerif</td>
</tr>
<tr>
<td>Times</td>
<td>Times, Times Roman, Times-Roman, serif, any</td>
</tr>
<tr>
<td>Courier</td>
<td>Courier, monospace, Monospaced</td>
</tr>
<tr>
<td>Symbol</td>
<td>Symbol</td>
</tr>
<tr>
<td>ZapfDingbats</td>
<td>ZapfDingbats</td>
</tr>
</tbody>
</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>
<h2 id="missing-fonts">Missing Fonts</h2>
<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>
<h2 id="missing-glyphs">Missing Glyphs</h2>
<p>Every font contains a particular set of <a href="http://en.wikipedia.org/wiki/Glyph">glyphs</a>. 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>
<h2 id="awt">Java2D/AWT/Operating System Fonts</h2>
<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>
<h2 id="custom">Custom Fonts</h2>
<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 <a href="output.html">output formats</a>.</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>
<p><a href="http://partners.adobe.com/asn/developer/type/ftypes.html">Adobe font types</a></p>
</li>
<li>
<p><a href="http://partners.adobe.com/asn/developer/technotes/fonts.html">Adobe Font Technote</a></p>
</li>
</ul>
<h2 id="basics">Basic font configuration</h2>
<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>
<div class="highlight"><pre><span></span><span class="nt">&lt;renderers&gt;</span>
<span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;application/pdf&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;fonts&gt;</span>
<span class="c">&lt;!-- register all the fonts found in a directory --&gt;</span>
<span class="nt">&lt;directory&gt;</span>C:\MyFonts1<span class="nt">&lt;/directory&gt;</span>
<span class="c">&lt;!-- register all the fonts found in a directory and all of its sub directories (use with care) --&gt;</span>
<span class="nt">&lt;directory</span> <span class="na">recursive=</span><span class="s">&quot;true&quot;</span><span class="nt">&gt;</span>C:\MyFonts2<span class="nt">&lt;/directory&gt;</span>
<span class="c">&lt;!-- automatically detect operating system installed fonts --&gt;</span>
<span class="nt">&lt;auto-detect/&gt;</span>
<span class="nt">&lt;/fonts&gt;</span>
<span class="nt">&lt;/renderer&gt;</span>
<span class="nt">&lt;/renderers&gt;</span>
</pre></div>
<p>Review the documentation for <a href="configuration.html">FOP Configuration</a> 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.</p>
<h2 id="advanced">Advanced font configuration</h2>
<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>
<h3 id="type1-metrics">Type 1 Font Metrics</h3>
<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>
<div class="highlight"><pre><span></span>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
</pre></div>
<p>Unix:</p>
<div class="highlight"><pre><span></span>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
</pre></div>
<p>PFMReader [options]:</p>
<ul>
<li><strong>-fn <fontname></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>
<p><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></p>
<p><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></p>
<h3 id="truetype-metrics">TrueType Font Metrics</h3>
<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>
<div class="highlight"><pre><span></span>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
</pre></div>
<p>TTFReader [options]:</p>
<ul>
<li>
<p><strong>-d <DEBUG | INFO ></strong> Sets the debug level (default is INFO).</p>
</li>
<li>
<p><strong>-fn <fontname></strong> Same as for PFMReader.</p>
</li>
<li>
<p><strong>-ttcname <fontname></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.</p>
</li>
<li>
<p><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:</p>
</li>
</ul>
<table>
<thead>
<tr>
<th>Issue</th>
<th>WinAnsi</th>
<th>CID-keyed</th>
</tr>
</thead>
<tbody>
<tr>
<td>Usable Character Set</td>
<td>Limited to WinAnsi character set, which is roughly equivalent to iso-8889-1.</td>
<td>Limited only by the characters in the font itself.</td>
</tr>
<tr>
<td>Embedding the Font</td>
<td>Optional.</td>
<td>Mandatory. Not embedding the font produces invalid PDF documents.</td>
</tr>
</tbody>
</table>
<p><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></p>
<h3 id="truetype-collections-metrics">TrueType Collections</h3>
<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>
<div class="highlight"><pre><span></span>java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar
org.apache.fop.fonts.apps.TTFReader -ttcname &quot;MS Mincho&quot;
msmincho.ttc msminch.xml
</pre></div>
<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>
<div class="highlight"><pre><span></span><span class="nt">&lt;font</span> <span class="na">embed-url=</span><span class="s">&quot;gulim.ttc&quot;</span> <span class="na">sub-font=</span><span class="s">&quot;GulimChe&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;GulimChe&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
<span class="nt">&lt;/font&gt;</span>
</pre></div>
<h3 id="register">Register Fonts with FOP</h3>
<p>You must tell FOP how to find and use the font metrics files by registering them in the <a href="configuration.html">FOP Configuration</a>. Add entries for your custom fonts, regardless of font type, to the configuration file in a manner similar to the following:</p>
<div class="highlight"><pre><span></span><span class="nt">&lt;renderers&gt;</span>
<span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;application/pdf&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;fonts&gt;</span>
<span class="c">&lt;!-- register a particular font --&gt;</span>
<span class="nt">&lt;font</span> <span class="na">metrics-url=</span><span class="s">&quot;file:///C:/myfonts/FTL_____.xml&quot;</span> <span class="na">kerning=</span><span class="s">&quot;yes&quot;</span>
<span class="na">embed-url=</span><span class="s">&quot;file:///C:/myfonts/FTL_____.pfb&quot;</span>
<span class="na">encoding-mode=</span><span class="s">&quot;single-byte&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;FrutigerLight&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
<span class="nt">&lt;/font&gt;</span>
<span class="c">&lt;!-- register all the fonts found in a directory --&gt;</span>
<span class="nt">&lt;directory&gt;</span>C:\MyFonts1<span class="nt">&lt;/directory&gt;</span>
<span class="c">&lt;!-- register all the fonts found in a directory and all of its sub directories (use with care) --&gt;</span>
<span class="nt">&lt;directory</span> <span class="na">recursive=</span><span class="s">&quot;true&quot;</span><span class="nt">&gt;</span>C:\MyFonts2<span class="nt">&lt;/directory&gt;</span>
<span class="c">&lt;!-- automatically detect operating system installed fonts --&gt;</span>
<span class="nt">&lt;auto-detect/&gt;</span>
<span class="nt">&lt;/fonts&gt;</span>
<span class="nt">&lt;/renderer&gt;</span>
<span class="nt">&lt;/renderers&gt;</span>
</pre></div>
<ul>
<li>
<p>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 <a href="configuration.html">FOP: Configuration</a> for more information.</p>
</li>
<li>
<p>The "metrics-url" attribute is generally not necessary except if you run into problems with certain fonts.</p>
</li>
<li>
<p>Either an "embed-url" or a "metrics-url" must be specified for font tag configurations.</p>
</li>
<li>
<p>The font "kerning" attribute is optional. Default is "true".</p>
</li>
<li>
<p>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.</p>
</li>
<li>
<p>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.</p>
</li>
<li>
<p>The attribute "encoding-mode" is optional an may have the following values:</p>
<ul>
<li>
<p>auto: default font encoding mode ("cid" for Truetype, "single-byte" for Type 1)</p>
</li>
<li>
<p>single-byte: use single-byte encodings in the target format (if applicable)</p>
</li>
<li>
<p>cid: encode as CID-keyed font (currently only supported for PDF output with TrueType fonts)</p>
</li>
</ul>
</li>
<li>
<p>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.</p>
</li>
<li>
<p>The fonts "auto-detect" tag can be used to automatically register fonts that are found to be installed on the native operating system.</p>
</li>
<li>
<p>Fonts registered with "font" tag configurations override fonts found by means of "directory" tag definitions.</p>
</li>
<li>
<p>Fonts found as a result of a "directory" tag configuration override fonts found as a result of the "auto-detect" tag being specified.</p>
</li>
<li>
<p>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.</p>
</li>
</ul>
<h3 id="autodetect">Auto-Detect and auto-embed feature</h3>
<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>
<div class="highlight"><pre><span></span>Manifest-Version: 1.0
Name: font/myfont.ttf
Content-Type: application/x-font
</pre></div>
<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>
<h3 id="embedding">Embedding</h3>
<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>
<p>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.</p>
</li>
<li>
<p>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:</p>
<div class="highlight"><pre><span></span><span class="nt">&lt;fop</span> <span class="na">version=</span><span class="s">&quot;1.0&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;fonts&gt;</span>
<span class="nt">&lt;referenced-fonts&gt;</span>
<span class="nt">&lt;match</span> <span class="na">font-family=</span><span class="s">&quot;Helvetica&quot;</span><span class="nt">/&gt;</span>
<span class="nt">&lt;match</span> <span class="na">font-family=</span><span class="s">&quot;DejaVu.*&quot;</span><span class="nt">/&gt;</span>
<span class="nt">&lt;/referenced-fonts&gt;</span>
<span class="nt">&lt;/fonts&gt;</span>
<span class="nt">&lt;/fop&gt;</span>
</pre></div>
</li>
</ol>
<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 <a href="https://docs.oracle.com/javase/7/docs/api/java/util/regex/package-summary.html">package</a>. 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>
<p>The PostScript renderer does not yet support TrueType fonts, but can embed Type 1 fonts.</p>
</li>
<li>
<p>The font is simply embedded into the PDF file, it is not converted.</p>
</li>
<li>
<p>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.</p>
</li>
<li>
<p>When embedding PostScript fonts, the entire font is always embedded.</p>
</li>
<li>
<p>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.</p>
</li>
</ul>
<h3 id="substitution">Substitution</h3>
<p>When a <code>&lt;substitutions/&gt;</code> 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>
<p>If a <code>&lt;substitution/&gt;</code> is declared, it is mandatory that both a <from/> and <to/> child element is declared with a font-family attribute.</p>
</li>
<li>
<p>Both font-weight and font-style are optional attributes, if they are provided then a value of 'normal' is assumed.</p>
</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>
<div class="highlight"><pre><span></span><span class="nt">&lt;fop</span> <span class="na">version=</span><span class="s">&quot;1.0&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;fonts&gt;</span>
<span class="nt">&lt;substitutions&gt;</span>
<span class="nt">&lt;substitution&gt;</span>
<span class="nt">&lt;from</span> <span class="na">font-family=</span><span class="s">&quot;Arial&quot;</span> <span class="na">font-weight=</span><span class="s">&quot;700..900&quot;</span><span class="nt">/&gt;</span>
<span class="nt">&lt;to</span> <span class="na">font-family=</span><span class="s">&quot;Arial Black&quot;</span><span class="nt">/&gt;</span>
<span class="nt">&lt;/substitution&gt;</span>
<span class="nt">&lt;substitution&gt;</span>
<span class="nt">&lt;from</span> <span class="na">font-family=</span><span class="s">&quot;FrutigerLight&quot;</span><span class="nt">/&gt;</span>
<span class="nt">&lt;to</span> <span class="na">font-family=</span><span class="s">&quot;Times&quot;</span> <span class="na">font-weight=</span><span class="s">&quot;bold&quot;</span> <span class="na">font-style=</span><span class="s">&quot;italic&quot;</span><span class="nt">/&gt;</span>
<span class="nt">&lt;/substitution&gt;</span>
<span class="nt">&lt;/substitutions&gt;</span>
<span class="nt">&lt;/fonts&gt;</span>
<span class="nt">&lt;/fop&gt;</span>
</pre></div>
<h2 id="selection">Font Selection Strategies</h2>
<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>
<p>aaa lll xxx would be displayed in fonts A A B</p>
</li>
<li>
<p>aaaxx would be displayed in font A</p>
</li>
<li>
<p>aaaxxx would be displayed in font A</p>
</li>
<li>
<p>aaaxxxx would be displayed in font B</p>
</li>
</ul>
<p>Character-by-Character is NOT yet supported!</p>
<h2 id="font-list">Font List Command-Line Tool</h2>
<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>
<div class="clear"></div>
<div id="footer">
<div class="copyright">
<div style="float:left; padding: 7px;">
<a title="Apache Software Foundation" href="http://www.apache.org"><img id="asf-feather-logo" alt="Apache Software Foundation" src="/images/asf_logo_url.png" width="200" /></a>
</div>
<p>
Copyright &copy; 2016 The Apache Software Foundation, Licensed under
the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
<br />
Apache, Apache XML Graphics, Apache FOP, Apache Batik, the Apache feather logo, and the
Apache XML Graphics logos are trademarks of <a href="http://www.apache.org">The Apache
Software Foundation</a>. All other marks mentioned may be trademarks or registered
trademarks of their respective owners.
<br />
</p>
</div>
</div>
</body>
</html>