Hi Andreas and Max,

I have attached patch file which updates the 0.94 and trunk documentation with a more detailed description of the inner workings of font auto-detection on different plaforms.

Adrian.

Max Berger wrote:
Andreas,

Looks like there is some text missing here. It should probably be something like:

Fonts in well-known paths are automatically detected. The paths for Unix-Systems are:
* [ the four bullets]
For Windows Systems these are:
* [add paths for windows]



Max Berger
e-mail: [EMAIL PROTECTED]

--
PGP/GnuPG ID: E81592BC   Print: F489F8759D4132923EC4 BC7E072AB73AE81592BC
For information about me or my projects please see http://max.berger.name


Am 05.09.2007 um 23:35 schrieb Andreas L Delmelle:


Hi all,

Is there a slight error on our fonts page?

see: http://xmlgraphics.apache.org/fop/0.94/fonts.html#register

What is the function/meaning of the first four bullets?

Have I missed something? Anyone know where these come from?


Cheers

Andreas


Index: src/documentation/content/xdocs/0.94/fonts.xml
===================================================================
--- src/documentation/content/xdocs/0.94/fonts.xml	(revision 573533)
+++ src/documentation/content/xdocs/0.94/fonts.xml	(working copy)
@@ -234,7 +234,7 @@
              msmincho.ttc msminch.xml</source>
       </section>
       <section id="register">
-        <title>Register Fonts with FOP - Auto-Detect Fonts</title>
+        <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 <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>
         <source><![CDATA[
 <fonts>
@@ -259,31 +259,30 @@
           instructions on making the FOP configuration available to FOP when it runs. Otherwise,
           FOP has no way of finding your custom font information.
         </note>
-        The Unix autodetect feature looks in the following locations for fonts it can use:
         <ul>
-          <li><code>java user.home + "/.fonts"</code></li>
-          <li><code>"/usr/local/fonts"</code></li>
-          <li><code>"/usr/share/fonts"</code></li>
-          <li><code>"/usr/X11R6/lib/X11/fonts"</code></li>
-        </ul>
-        <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 <a href="configuration.html">FOP: Configuration</a> for more information.
           </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>
           <li>Either an "embed-url" or a "metrics-url" must be specified for font tag configurations.</li>
           <li>The font "kerning" attribute is optional.</li>
           <li>If embedding is off, 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 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>The fonts "auto-detect" tag can be used to automatically register fonts that are found to be installed on the native operating system.
+             <ul>
+                <li>On Unix platforms the autodetect feature looks in java user.home + "/.fonts", "/usr/local/fonts", "/usr/share/fonts" and "/usr/X11R6/lib/X11/fonts" for fonts it is able to use.</li>
+                <li>On Mac platforms the autodetect feature looks in java user.home + "/Library/Fonts/, "/Library/Fonts/", "/System/Library/Fonts/" and "/Network/Library/Fonts/" for fonts it is able to use.</li>
+                <li>On Windows platforms the autodetect feature attempts to determine the Windows fonts directory (usually C:\WINDOWS\FONTS) and also the existence of a PSFONTS directory for fonts it is able to use.</li>
+             </ul>
           </li>
         </ul>
         <!--note>Cocoon users will need to setup the config, see FOPSerializer for more information.</note-->
Index: src/documentation/content/xdocs/trunk/fonts.xml
===================================================================
--- src/documentation/content/xdocs/trunk/fonts.xml	(revision 573539)
+++ src/documentation/content/xdocs/trunk/fonts.xml	(working copy)
@@ -24,6 +24,7 @@
     <authors>
       <person name="Jeremias Märki" email=""/>
       <person name="Tore Engvig" email=""/>
+      <person name="Adrian Cumiskey" email=""/>
     </authors>
   </header>
   <body>
@@ -129,8 +130,7 @@
 More information about fonts can be found at:</p>
       <ul>
         <li><a href="http://partners.adobe.com/asn/developer/type/ftypes.html";>Adobe font types</a></li>
-        <li><a href="http://partners.adobe.com/asn/developer/technotes/fonts.html";>Adobe Font Technote</a>
-</li>
+        <li><a href="http://partners.adobe.com/asn/developer/technotes/fonts.html";>Adobe Font Technote</a></li>
       </ul>
       <section id="type1-metrics">
         <title>Type 1 Font Metrics</title>
@@ -236,19 +236,54 @@
       <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 <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>
-        <source><![CDATA[<font metrics-url="file:///C:/myfonts/FTL_____.xml" kerning="yes"
+        <source><![CDATA[
+<fonts>
+  <!-- register a particular font -->
+  <font metrics-url="file:///C:/myfonts/FTL_____.xml" kerning="yes"
       embed-url="file:///C:/myfonts/FTL_____.pfb">
-  <font-triplet name="FrutigerLight" style="normal" weight="normal"/>
-</font>]]></source>
-        <note>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.</note>
+     <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>]]></source>
+        <note>
+          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.
+        </note>
         <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 <a href="configuration.html">FOP: Configuration</a> for more information.
           </li>
-          <li>The "kerning" and "embed-url" attributes are optional. Kerning is currently not used at all. If embedding is off, 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>
+            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>
+          <li>Either an "embed-url" or a "metrics-url" must be specified for font tag configurations.</li>
+          <li>The font "kerning" attribute is optional.</li>
+          <li>If embedding is off, 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 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>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>The fonts "auto-detect" tag can be used to automatically register fonts that are found to be installed on the native operating system.
+             <ul>
+                <li>On Unix platforms the autodetect feature looks in java user.home + "/.fonts", "/usr/local/fonts", "/usr/share/fonts" and "/usr/X11R6/lib/X11/fonts" for fonts it is able to use.</li>
+                <li>On Mac platforms the autodetect feature looks in java user.home + "/Library/Fonts/, "/Library/Fonts/", "/System/Library/Fonts/" and "/Network/Library/Fonts/" for fonts it is able to use.</li>
+                <li>On Windows platforms the autodetect feature attempts to determine the Windows fonts directory (usually C:\WINDOWS\FONTS) and also the existence of a PSFONTS directory for fonts it is able to use.</li>
+             </ul>
+          </li>
         </ul>
         <!--note>Cocoon users will need to setup the config, see FOPSerializer for more information.</note-->
       </section>
@@ -266,17 +301,11 @@
         <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>
         <p>When embedding PostScript fonts, the entire font is always embedded.</p>
-        <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.
-Currently, this embedded font contains only the minimum data needed to be embedded in a pdf document, and does not contain any codepage information.
-The PDF document contains indexes to the glyphs in the font instead of to encoded characters.
-While the document will be displayed correctly, the net effect of this is that searching, indexing, and cut-and-paste will not work properly.</p>
-        <p>One workaround for this behavior is to use the "-enc ansi" option when generating metrics with TTFReader.
-This will cause the whole font to be embedded in the pdf document.
-Characters will be WinAnsi encoded (as specified in the PDF spec), so you lose the ability to use characters from other character sets.
-See <a href="#ttf-encoding">Table of TTF Encoding Options</a> for more details.</p>
+        <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.</p>
       </section>
       <section id="embedding-base14">
-        <title>Explicitely embedding the base 14 fonts</title>
+        <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

Reply via email to