[XeTeX] Font Problems & xdv2pdf vs xdv2pdfmx (with FAQ entry suggestion)

Freek Dijkstra software at macfreek.nl
Wed Jan 7 23:42:29 CET 2009


Finally!! I got stuck on a problem for about two weeks now, and finally
found a work-around. I hope someone with detailed knowledge on drivers
can give me some final advice.

I am working on the layout of my thesis, and decided to use xelatex
instead of pdflatex. For simple files, xelatex worked fine, but for more
complex stuff I got -amongst others- the following problems:
- Sometimes text is missing in PDF images
- Sometimes text is missing in formulas

The most annoying part, of course, was the "sometimes". Indeed, using
exactly the same commands I got different results.

Mostly I tried to vary with the drivers of packages. These two options
worked for me, both with xelatex 0.996-patch and 0.999 (the first a
patched version from texlive 2007 installed by MacPorts, the second from
textlive 2008):

 \usepackage{graphicx}
 \usepackage[plainpages=false,pdfpagelabels]{hyperref}

 \usepackage[xetex]{graphicx}
 \usepackage[xetex,plainpages=false,pdfpagelabels]{hyperref}

 \usepackage[xetex]{graphicx}
 \usepackage[dvipdfmx,plainpages=false,pdfpagelabels]{hyperref}

When I simply run xelatex test.tex, I got no errors, but no output file:
  Output file removed.

The reasons only became obvious when I did run xelatex and xdv2pdf
separately:

 xelatex --no-pdf test
 xdv2pdf test.xdv

I got the following errors and warnings:
 xdv2pdf <Error>: can't find font object for font id 2949602.
 xdv2pdf <Error>: WARNING: Type1 font data returned by
OFAStreamPSDownload isn't in the correct format required by the Adobe
Type 1Font Format specification.
 xdv2pdf <Error>: ATSFontGetPostScriptName failed: error -984.
 ttf_create_with_id: failed to find font object for id 2949602.
 xdv2pdf <Error>: WARNING: --font-2949602-6--: missing or invalid font
descriptor.

Here did the dreadful "sometimes" come into play: if I immediately did
re-run xdv2pdf test.xdv, *sometimes* the "can't find font object" and
"ATSFontGetPostScriptName failed" error would go away, while the
"OFAStreamPSDownload isn't in the correct format" warning remained. I
was unable to find a pattern when it occured or not.

In the few cases that I only got a warning, no error, the PDF was fine.
However, that was not consistently reproducible, so not a good solution.

In the end, I found that I got consisteny good results by:

1. upgrading to XeTeX 0.999 (from 0.996-patch in texlive 2007)
2. Using xdv2pdfmx instead of xdv2pdf

Thus:
 /usr/local/texlive/2008/bin/universal-darwin/xelatex --no-pdf test
 /usr/local/texlive/2008/bin/universal-darwin/xdv2pdfmx test.xdv

Now my question:
Is it possible to use xdv2pdfmx instead of xdv2pdf from xelatex?
E.g. something like "xelatex --use-xdv2pdfmx test"?


Any clue as of why this behaviour?
Perhaps it would be a good advice to add to the FAQ on
http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=xetex_faq
Surely knowing this would saved me two weeks of frustration...


Finally, the entry on Type1 errors in the FAQ is wrong:
http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=xetex_faq#type1
It states that the warning "Type1 font data returned by
OFAStreamPSDownload isn't in the correct format required by the Adobe
Type 1Font Format specification." is caused by the use of the Computer
Modern font. In my experience, it occurs for all fonts that I tried on
my system. However, it only occurs when using the xdv2pdf command, but
never when I use the xdv2pdfmx command. Perhaps you may want to edit
that FAQ entry as well.


Regards,
Freek Dijkstra


PS: If you want to have my test latex file and/or details output results
for various settings, just let me know.


More information about the XeTeX mailing list