Hi all...

After upgrading to FOP 0.93 I'm having issues getting custom fonts working. I've properly updated my configuration to the new schema for the config file:

  <fop version="1.0">
    <renderers>
      <renderer mime="application/pdf">
        <fonts>
          <font metrics-url="arial-unicode.xml" kerning="yes"
                embed-url="ARIALUNI.TTF">
            <font-triplet name="Arial Unicode MS"
                          style="normal" weight="normal"/>
            <font-triplet name="Arial Unicode MS"
                          style="normal" weight="bold"/>
            <font-triplet name="Arial Unicode MS"
                          style="italic" weight="normal"/>
            <font-triplet name="Arial Unicode MS"
                          style="italic" weight="bold"/>
          </font>
        </fonts>
      </renderer>
    </renderers>
  </fop>

The base font URL and all is set from the Java side (as it changes, depending on whether the app is run from the installation or the source directory.)

Anyway what happens now is, the international characters don't show up. I did some digging around in the debugger though and here's what's going on.

FontInfo.getMetricsFor(String) is being called... but the name it's being passed is something like "any,normal,400". What I would expect it should be getting is "Arial Unicode MS,normal,400".

And indeed, when I update my configuration putting "any" in for all font names, it works as expected, i.e.:

          ...
            <font-triplet name="any" style="normal" weight="normal"/>
            <font-triplet name="any" style="normal" weight="bold"/>
            <font-triplet name="any" style="italic" weight="normal"/>
            <font-triplet name="any" style="italic" weight="bold"/>
          ...

I'm at a loss as to why this is happening. The XSL-FO file certainly declares the entire document to be "Arial Unicode MS", i.e.:

  <fo:flow flow-name="xsl-region-body"
           font-family="Arial Unicode MS" hyphenate="true">

Anyone seen similar behaviour?

Daniel



--
Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
Web: http://nuix.com/                               Fax: +61 2 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to