Question
· Sep 3, 2021

Installing new fonts for FOP

I'm using FOP 1.1 for ZEN reports and would like to install fonts within the Windows/Fonts directory.

I added the xml tags in fop.xconf but so far I have been unable to get the correct font.

<renderers>
    <renderer mime="application/pdf">

 <fonts>
        <directory>c:\windows\fonts</directory>
        <!-- automatically detect operating system installed fonts -->
         <auto-detect/>
       </fonts>

</renderer>

</renderers>

Any advice would be appreciated.

Product version: Caché 2018.1
Discussion (5)1
Log in or sign up to continue

The structure in the fop.xconf is defined as shown below - I'm not sure of the error you are getting, but you may need to add in the recursive=true to allow for any sub-folders to be viewed.

     <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>