# How to use \texttt with CMU Typewriter Text in XeTeX?

The following example won't compile

\documentclass[xetex,sans,mathserif]{beamer}

\usepackage{fontspec}
\setmainfont{CMU Serif}
\setsansfont{CMU Sans Serif}
\setmonofont{CMU Typewriter Text}

\begin{document}

\begin{frame}
Hello, world! \texttt{Hello, world!}
\end{frame}

\end{document}


, whining that

** WARNING ** Obsolete four arguments of "endchar" will be used for Type 1 "seac" operator.
** ERROR ** This font using the "seac" command for accented characters...


It's perfectly OK to use \setmonofont{Courier New} though. So how do I use CMU Typewriter Text here?

-
I don't get such warning and error (but beamer tells something about options sans and mathserif); otfinfo -i tells that cmuntt.otf is version 0.7.0 – egreg Nov 11 '11 at 22:41
I don't get these warnings either. I'm running MacTeX2011, and otfinfo -i on both cmunss.otf and cmuntt.otf reports versions of 0.6.3 and 0.6.3a, respectively. By the way, my version of beamer issues a warning that both the sans and mathserif options are obsolete. – Mico Nov 12 '11 at 0:19
run it with lualatex instaed of xelatex then it should work – Herbert Nov 12 '11 at 8:40
I'm running MikTeX 2.9 and I don't really know how to find out OpenType font version under W7. – Egor Tensin Nov 12 '11 at 11:37
I've hit the same problem, but I can't use LuaTeX, as I need XeTeX's \XeTeXinterchartokenstate feature. Is there some other workaround? If this is a bug in the font files, who should it be reported to? The packager, or the cm-unicode project? – Marc Schütz Aug 27 '12 at 18:35

Thank you, Herbert! Running lualatex instead of xelatex worked like a charm! One must also replace xetex with luatex like \documentclass[luatex]{beamer}.