A font substitution facility to handle this requirement has recently
been added to FOP Trunk. I've just updated the website but it will take
a few hours until the web server is synchronized. So I'll just paste the
documentation here for your convenience:
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.
<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>
This will pop up here later:
http://xmlgraphics.apache.org/fop/trunk/fonts.html
Feedback is welcome as it's a new feature!
HTH
On 03.06.2008 17:32:14 Ingo Maas wrote:
> Hallo,
>
> I have a little problem with the Windows font "Times New Roman". The Word2FO
> stylesheet from RenderX does a normalization of font family names, resulting
> in "TimesNewRoman" (without spaces) in the XSL-FO which FOP fails to resolve
> using its font auto detection feature.
>
> When using the old style font metrics settings in FOP configuration it
> was/is possible to set font family name aliases. Can someone confirm that
> it's not possible to use a combination of auto detection and font aliases
> without providing any metrics configuration.
>
> Here is the relevant part of my fop.xconf:
>
> <fop version="1.0">
>
> <!-- Base URL for resolving relative URLs -->
> <!--base>.</base-->
>
> <!-- Source resolution in dpi (dots/pixels per inch) for determining the
> size of pixels in SVG and bitmap images, default: 72dpi -->
> <source-resolution>72</source-resolution>
> <!-- Target resolution in dpi (dots/pixels per inch) for specifying the
> target resolution for generated bitmaps, default: 72dpi -->
> <target-resolution>200</target-resolution>
>
> <!-- Default page-height and page-width, in case
> value is specified as auto -->
> <default-page-settings height="297mm" width="210mm"/>
>
> <!-- Information for specific renderers -->
> <!-- Uses renderer mime type for renderers -->
> <renderers>
> <renderer mime="application/pdf">
> <filterList>
> <!-- provides compression using zlib flate (default is on) -->
> <value>flate</value>
> </filterList>
>
> <fonts>
> <!-- embedded fonts -->
> <auto-detect/>
> </fonts>
>
> </renderer>
> <renderer mime="image/tiff">
> <transparent-page-background>true</transparent-page-background>
> <compression>CCITT T.4</compression>
> <fonts>
> <auto-detect/>
> </fonts>
> </renderer>
> ...
> </fop>
>
> Regards, Ingo
>
>
> --
> Ernst Basler + Partner GmbH
> Ingo Maas
> Tuchmacherstraße 47
> DE-14482 Potsdam
>
> +49 331 74 75 9 0 (Zentrale)
> +49 331 74 75 9 78 (Direkt)
> +49 331 74 75 9 90 (Fax)
>
> Geschäftsführer: Dr. Ludger Paus
> Amtsgericht Potsdam - HRB 6362 P
> USt-Id Nr. 152768391
>
> mailto:[EMAIL PROTECTED]
> http://www.ebp.de
>
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]