# XeLaTeX, non-English characters don't display

I use XeLaTeX + View PDF in Texmaker to create a pdf document. However, the Chinese characters don't display, as shown in the following figure.

PS: The configuration of XeLaTeX is xelatex -synctex=1 -interaction=nonstopmode %.tex.

Here is the test code.

\documentclass[compress]{beamer}
\usetheme{Warsaw}

\usepackage{fontspec}

\title{标题}
\author{作者}
\date{}

\begin{document}

\titlepage
\end{frame}

\begin{frame}{测试}

\end{frame}

\end{document}

• The default font is latin modern which does not cover Chinese, you need to specify a suitable font (any opentype font on your system) – David Carlisle Oct 21 '15 at 12:44
• I don't know about the Latin Modern fonts, which should be defaulted by XeLaTeX, but have you tried switching fonts with one that surely has all of your needed glyphs? – Moriambar Oct 21 '15 at 12:45

When I view your question Firefox picked Microsoft YaHei font so I tell xetex to do the same:

\documentclass[compress]{beamer}
\usetheme{Warsaw}

\usepackage{fontspec}
\setsansfont{Microsoft YaHei}
\title{标题}
\author{作者}
\date{}

\begin{document}

\titlepage
\end{frame}

\begin{frame}{测试}

\end{frame}

\end{document}

• Thx. It works. Where can I find a list of font names? – SparkAndShine Oct 21 '15 at 13:00
• @SparkandShine depends a lot on which operating system you are using. If you select an element on firefox and "inspect element" you can find out what font it is using, which is what I did above. but most systems have some sort of font browser that lets you browse fonts on your system. – David Carlisle Oct 21 '15 at 13:03
• if you are on a mac they are in /Applications/Font Book.app – בנימן הגלילי Oct 21 '15 at 17:56
• Check Windows available fonts by Start --> Run --> %windir%\fonts --> OK – SparkAndShine Oct 21 '15 at 19:54

Had a similar problem with chars not shown properly ore not shown at all. First you have to be sure, if the font family you are using covers the chars you need. If it does, it isn't enough to chose this family, you have to copy the font files into an own folder and link them in as described here.