\documentclass{article}
\usepackage{fontspec}
\setmainfont{DejaVu Serif}
\setsansfont{DejaVu Sans}
\setmonofont{DejaVu Sans Mono}
\begin{document}
Hello World!
\textsf{Hello World!}
\texttt{Hello World!}
\end{document}
compiled with XeLaTeX gives me this:
Copying the output with SumatraPDF even shows regular space characters between the letters and a line break between the words:
Hello World!
Hello World!
H e l l o
W o r l d !
(Copying it with Adobe Reader XI Win, however, yields three identical lines.)
This problem doesn't occur with LuaLaTeX:
The OCR-layer-text for LuaLaTeX is flawless as well, using either PDF viewer.
I assume this is a XeTeX bug? Can I circumvent it somehow?
I'm using MiKTeX 2.9, and version 2.33 of the DejaVu fonts, which I think came preinstalled with Windows (7), at least I can't recall manually installing these fonts. This version seems to be the current version, at any rate.
P.S.: If someone can recommend another monospaced font for code that a) goes well with Linux Libertine and b) contains lowercase Greek letters, that'd be helpful, too. But that just as an aside :)
.