4

I'm trying to use Microsoft's Arial Unicode font in a DocBook project. The project is using Apache's FOP. FOP is installed in /usr/local/bin/fop-1.1.

The Arial_Unicode.ttf font is installed in /usr/share/fonts/truetype/:

$ ls -l /usr/share/fonts/truetype/
total 22812
drwxr-xr-x 2 root    root      4096 Oct 22 11:43 abyssinica
-rw-r--r-- 1 root    root  23278008 Oct  8  2013 Arial_Unicode.ttf
drwxr-xr-x 2 root    root      4096 Nov  7 12:02 dejavu
...

FOP's configuration file is located at:

$ find /usr/local/bin/fop-1.1/ -iname *.xconf
/usr/local/bin/fop-1.1/conf/fop.xconf

I opened fop.xconf and added two directory elements and auto-detect element under renderer for mime="application/pdf" per Apache's Bulk Font Configuration:

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

      <fonts>
        <directory recursive="true">/usr/share/fonts</directory>
        <directory recursive="true">/usr/share/fonts/truetype</directory>

        <!-- automatically detect operating system installed fonts -->
        <auto-detect/>

        ...
      </fonts>
    ...

When I build my book, nearly all the glyphs are #:

enter image description here

When using a different Object Processor (such as RenderX's xep), the document renders. So I believe the DocBook XML is good (specifically, the custom translation that uses Arial_Unicode.ttf).

How do I make Apache FOP honor its configuration?

jww
  • 12,722

1 Answers1

0

Try to specify the Arial font explicitly in the configuration file :

<?xml version="1.0"?>
<fop>
    <renderers>
        <renderer mime="application/pdf">       
          <fonts>                           
                <font kerning="yes" embed-url="file:///C:/windows/fonts/arial.ttf">
                      <font-triplet name="Arial" style="normal" weight="normal"/>
                </font>                     
          </fonts>
        </renderer>
    </renderers>     
</fop> 
harrymc
  • 498,455