Jeremias,

Trying to isolate the culprit, I did some more experiments, with mixed
results.

I created a text file containing eight of my installed TrueType fonts
in both XSL-FO and in OpenOffice, and created PDFs using Fop 0.94 and
OOo's PDF export, respectively (see
http://www.intelsig.be/~piater/nobackup/fop/).

The results in a nutshell:

- The Fop-generated PDF is displayed only partially by all of my
  open-source PDF renderers (xpdf, gv, kpdf, evince).

  Fonts rendered correctly:
  - BitstreamVeraSerif
  - DejaVuSerif
  - LiberationSerif
  - GentiumBasic (downloaded from SIL's Web site)

  Fonts rendered invisibly (but copy-and-pastable nevertheless):
  - FreeSerif
  - cmr10 (from latex-xft-fonts)
  - LinuxLibertine
  - STIXGeneral (OTF from stixfonts.org converted to TTF using fontforge)

- The Fop-generated PDF is read correctly by Acroread 8.

- All fonts are correctly read and displayed by both OOo and ftview
  (the FreeType2 font viewer).

- The OOo-generated PDF is read correctly by *all* viewers.


There is no obvious conclusion:

- It does not seem to be a Fop problem, since Acroread is unaffected.

- It does not seem to be a FreeType problem, since all my open-source
  programs link against it, including the unaffected OOo and ftview.

- And yet, all open-source viewers consistently fail on the
  Fop-generated output only.


Two related comments:

- The remarks on http://xmlgraphics.apache.org/fop/0.94/fonts.html
  that character encoding is "Never correct" and copy/paste "won't
  work" seem overly strong; both mostly work for me, including
  non-ASCII characters (albeit with different gotchas depending
  whether I paste into, say, Emacs or a terminal).

- That same page says that TrueType fonts are embedded as subsets, but
  pdffonts disagrees (see below).


Not being a font expert, I am stuck for now. Before I file a bug
against Fop, where could I take this?

Or perhaps other Fop users can share relevant insight regarding the
use of TrueType Unicode fonts with Fop?

Thanks,
Justus


pdffonts on Fop output:

name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
Helvetica                            Type 1            no  no  no      13  0
8E6c57STIXGeneral                    CID TrueType      yes no  yes     17  0
4E6b8aBitstreamVeraSerif             CID TrueType      yes no  yes     23  0
3E6b73LinuxLibertine                 CID TrueType      yes no  yes     35  0
5E6be2DejaVuSerif                    CID TrueType      yes no  yes     29  0
2E6b2dcmr10                          CID TrueType      yes no  yes     41  0
6E6bfeLiberationSerif                CID TrueType      yes no  yes     47  0
1E6ac4FreeSerif                      CID TrueType      yes no  yes     53  0
7E6c44GentiumBasic                   CID TrueType      yes no  yes     59  0


pdffonts on OOo output:

name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
BAAAAA+FreeSerif                     TrueType          yes yes yes     29  0
CAAAAA+cmr10                         TrueType          yes yes yes     49  0
DAAAAA+BitstreamVeraSans-Roman       TrueType          yes yes yes     54  0
EAAAAA+LinLibertine                  TrueType          yes yes yes     59  0
FAAAAA+BitstreamVeraSerif-Roman      TrueType          yes yes yes     44  0
GAAAAA+DejaVuSerif                   TrueType          yes yes yes     34  0
HAAAAA+LiberationSerif               TrueType          yes yes yes     19  0
IAAAAA+GentiumBasic                  TrueType          yes yes yes     24  0
JAAAAA+STIXGeneral                   TrueType          yes yes yes     39  0


My complete fop.xconf:

<?xml version="1.0"?>
<fop version="1.0">
  <strict-configuration>true</strict-configuration>
  <renderers>
    <renderer mime="application/pdf">
      <fonts>
        <directory>/usr/local/share/fonts/truetype/STIXBeta</directory>
        <directory>/usr/local/share/fonts/truetype/GentiumBasic</directory>
        <auto-detect/>
      </fonts>
    </renderer>
  </renderers>
</fop>

Fop outputs the following, none of which I think is relevant to the
above problems:

Jan 18, 2008 10:14:22 AM org.apache.fop.fonts.truetype.TTFFile readKerning
WARNING: Unicode index (1) not found for glyph 2870
Jan 18, 2008 10:14:22 AM org.apache.fop.fonts.truetype.TTFFile readKerning
WARNING: Unicode index (1) not found for glyph 2870
Jan 18, 2008 10:14:22 AM org.apache.fop.fonts.truetype.TTFFile determineAscDesc
WARNING: Ascender and descender together are larger than the em box. This could 
lead to a wrong baseline placement in Apache FOP.

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

Reply via email to