3

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:

my xelatex render

Edit 2

Files used are here, thanks for the help all.

3
  • 3
    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, 2011 at 2:13
  • 1
    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. May 9, 2011 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. May 9, 2011 at 8:16

1 Answer 1

1

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...

2
  • 1
    Given that you are not running an up-to-date TeXLive distribution (there are many differences between your file list and mine) it's not exactly fair to call this a bug.
    – Alan Munn
    May 9, 2011 at 10:18
  • Yes, that's very possible, thanks! I know the unicode-math package is also broken on my distro, the getnonfreefonts script is missing, etc. Hopefully things will get fixed upstream, or I'll switch to Ubuntu; thanks very much to you and everyone for helping me debug it. May 9, 2011 at 22:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .