# Cyrillic characters show up as '?' in PDF when using XeTeX

I've looked at many similar questions on TeX overflow to no avail. I've tried using both the polyglossia and the babel packages but neither had any effect. I'm assuming the issue lies a little deeper.

Here is a MWE:

\documentclass[10pt,a4paper]{article}
\usepackage{graphicx}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainfont{LMR12R-Gregory}
\setdefaultlanguage[variant=american]{english}
\setotherlanguage{russian}
\begin{document}

\textrussian{Привет!}

\end{document}


Below is shown the text on the PDF generated by this code:

What causes this? The font has both latin and cyrillic characters. In WordPad it works correctly, so I'm not sure what's going on. Any help would be highly appreciated.

As per the comments below, here is a dropbox link to the font: https://www.dropbox.com/s/4grjkah8x6ldgul/LMR12R-Gregory.ttf?dl=0

Here is a pastebin of the log. There were no issues or errors shown in TeXStudio. https://pastebin.com/jCx7w7s1

• if xetex doesn't show cyrillic it is quite probable that the font doesn't have the chars - applications like wordpad often use fallbacks in such cases. – Ulrike Fischer Jun 25 at 22:18
• And welcome to TeX.SX! – Skillmon Jun 25 at 22:23
• Welcome to TeX.SE! Thanks for adding a minimal example. It would help answer the question if the font were available. Barring that, can you add \tracinglostchars=2 and/or look in the log file for warnings about the font not containing the requested characters? – ShreevatsaR Jun 25 at 22:24
• The file works for me with no issues (the font looks like a stylized/italic/cursive one.) Check the encoding in TeXStudio: is it using UTF-8 or something else? – ShreevatsaR Jun 25 at 22:48
• Here is the picture of what I get – egreg Jun 25 at 22:57

• TeXstudio supports “magic comments”. While I generally do not use TeXstudio, I begin most of my documents with % !TEX TS-program = xelatex and % !TEX encoding = UTF-8, as quite a few compilers support this syntax. – Kess Vargavind Jun 26 at 0:02