[XeTeX] Bad glyph positions with DejaVu Sans Mono and Courier New

Tomáš Janoušek tomi at nomi.cz
Mon Apr 27 16:44:50 CEST 2009


Hello,

I'm having a very strange problem regarding glyph positions when the
monospaced fonts DejaVu Sans Mono or Courier New are used.

The source I'm typesetting is this:
> \documentclass[a4paper,10pt]{article}
> \usepackage{fontspec}
> %\setmonofont{Courier New}
> \setmonofont{DejaVu Sans Mono}
> \begin{document}
> \begin{verbatim}
> |
> -
> x
> .
> `
> '
> Pack my box with five dozen liquor jugs.
> \end{verbatim}
> \end{document}

When I process this with xelatex 0.999.6 and view it using Acrobat Reader or
ghostscript, I get the following result:
http://store.lisk.in/tmp/2009-04-27-163135_1920x2000_scrot.png

However, if I view it using evince or xpdf, I get this result:
http://store.lisk.in/tmp/2009-04-27-163440_1920x2000_scrot.png

Notice that glyphs | - . and ` are aligned left in acrobat and gs. The problem
is that ghostscript is being used to print to postscript printers, making it a
real problem for us.

The same thing happens with the Courier New font. It does not happen with
Latin Modern Mono, UM Typewriter and not even with Bitstream Vera Sans Mono
(which is what DejaVu is derived from -- this puzzles me). It also does not
happen with PDF files exported from OpenOffice.org.


Can you guys reproduce this? Is it an issue of the font itself or is XeTeX
behaving badly?

Thank you,
-- 
Tomáš Janoušek, a.k.a. Liskni_si, http://work.lisk.in/



More information about the XeTeX mailing list