# Computer Modern Unicode + OpenType for XeTeX / fontspec

I'd like to use the most modern version of the Computer Modern fonts for XeTeX [or anything newer, of course] with the FontSpec package. Currently, I'm using

\setromanfont{CMU Serif}


However, this produces odd results with certain characters, e.g. -- or ' in italic text (created with \emph), e.g. ὔ instead of '. The problem isn't there when I use Latin Modern Roman or Linux Libertine O, but [with Latin Modern Roman] foreign characters don't show up.

(Sure, Linux Libertine is beautiful, but I want something a little less classy for normal documents :). )

I'm also using polyglossia, LyX, and a small script to remove LyX output errors, if it matters. I've looked at the TeX file and it seems fine.

## Edit 1

Here's a minimal example, sorry for not providing this earlier.

\documentclass{article}
\usepackage{xunicode,fontspec,xltxtra}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\setromanfont{CMU Serif}
\setsansfont{CMU Sans Serif}
\setmonofont{CMU Typewriter Text}
\begin{document}
\emph{hello -- a'b}
\end{document}


The render I get using xelatex is this:

## Edit 2

Files used are here, thanks for the help all.

-
Can you make a minimal example that doesn't work for you, and add it to your question. If you make a document that just loads fontspec and sets the main font to CMU Serif does the problem arise? If yes, then there's something wrong, since such a document works for me. If not, add packages gradually to the sample document until you can reproduce the problem, and then post that example. –  Alan Munn May 9 '11 at 2:13
I get the expected output with your example. You could add \listfiles to the preamble to get all packages and their versions that you have. –  Andrey Vihrov May 9 '11 at 8:05
Thanks both, see edit... if it's not showing up for you, don't worry about it. It's possible that the OpenSuSE TeX distro is just outdated or somehow nonstandard. –  gatoatigrado May 9 '11 at 8:16

Apparently this bug is caused by the mapping=tex-text option (and its Ligatures=TeX equivalent), which translates things like -- into the en-dash, and so forth. I can't seem to find any related bugs using Google...