From cff8a3713fc7e069ab5bf46585131071d50fb979 Mon Sep 17 00:00:00 2001
From: Adrian Cumiskey
Date: Tue, 6 May 2008 16:14:09 +0000
Subject: * Added font substitution configuration reader, model, business
logic, junit test and docs. * Added java 1.5 generics comments to many
methods. * Performed some preparatory cleanup and refactoring which includes
(but is not limited to..) - Creating a FontManager delegating class that
is called upon when renderers are setting up fonts - A new FontCollection
interface and concrete implementing classes to supercede the static FontSetup
mechanism.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@653826 13f79535-47bb-0310-9956-ffa450edef68
---
src/documentation/content/xdocs/trunk/fonts.xml | 77 +++++++++++++++++--------
1 file changed, 53 insertions(+), 24 deletions(-)
(limited to 'src/documentation/content/xdocs')
diff --git a/src/documentation/content/xdocs/trunk/fonts.xml b/src/documentation/content/xdocs/trunk/fonts.xml
index 070ca8203..eb466ec73 100644
--- a/src/documentation/content/xdocs/trunk/fonts.xml
+++ b/src/documentation/content/xdocs/trunk/fonts.xml
@@ -201,17 +201,20 @@
support fonts. These fonts will then automatically be registered.
-
- C:\MyFonts1
+
+
+
+
+ C:\MyFonts1
-
- C:\MyFonts2
+
+ C:\MyFonts2
-
-
-]]>
+
+
+
+
+]]>
Review the documentation for FOP Configuration
for instructions on making the FOP configuration available to FOP when it runs.
@@ -318,23 +321,25 @@
Register Fonts with FOP
You must tell FOP how to find and use the font metrics files by registering them in the FOP Configuration. Add entries for your custom fonts, regardless of font type, to the configuration file in a manner similar to the following:
URLs are used to access the font metric and font files.
@@ -359,7 +364,7 @@
- Auto-Detect and auto-embedd feature
+ Auto-Detect and auto-embed feature
When the "auto-detect" flag is set in the configuration, FOP will automatically search for fonts in the default paths for your operating system.
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:
Manifest-Version: 1.0
@@ -385,6 +390,30 @@
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.
+
+ Substitution
+
When a <substitutions/> section is defined in the configuration, FOP will re-map any font-family references found in your FO input to a given substitution font.
+
+
If a <substitution/> is declared, it is mandatory that both a <from/> and <to/> child element is declared with a font-family attribute.
+
Both font-weight and font-style are optional attributes, if they are provided then a value of 'normal' is assumed.
+
+
For example you could make all FO font-family references to 'Arial' with weights between 700 and 900 reference the normal 'Arial Black' font.