Written by

Question Con Skordis · 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

Comments

Julie Bolinsky · Sep 3, 2021

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) --><directoryrecursive="true">C:\MyFonts2</directory><!-- automatically detect operating system installed fonts --><auto-detect/></fonts>
0
Con Skordis  Sep 7, 2021 to Julie Bolinsky

Julie,

I'm not getting any error but no matter what font family I select other than Arial, the PDF is generated with Times Roman.

Do I need to run a n install script for the above to take affect?

0
Julie Bolinsky  Sep 7, 2021 to Con Skordis

What fonts files do you have in your font directory? Is it recognizing any of those fonts? Have you tried to define individual one of those individual font and see if those get recognized?

0
Con Skordis  Sep 10, 2021 to Julie Bolinsky

Julie,

I have installed them under c:\windows\fonts and the fonts are only accessible if I reference them exactly.

For example the is the Aileron fonts but to access the bold type i have to specify the font-family as Aileron Black and not Aileron with a font-weight of bold.

0