[Tex/LaTex] Left and right quotation marks aren’t correct when using fontspec

fontspecpunctuationxetex

Using XeLaTeX the following document produces the correct result if \setmainfont{Arial} is never called (the quotation marks are proper left- and right-quotation marks). Once I try to set a font (even if it has the proper glyphs!) the output appears improperly as ``Quote me!''.

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Arial}
\begin{document}
``Quote me!''
\end{document}

Best Answer

Set the Ligatures=TeX feature for the font:

\setmainfont[Ligatures=TeX]{Arial}

with old versions of fontspec you should use

\setmainfont[Mapping=tex-text]{Arial}

instead. The later with also work with newer versions, but the former is recommended for better compatibility with LuaTeX documents.

A sample code:

\documentclass{article}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Arial}
\begin{document}
``Quote me!''
\end{document}

produces

enter image description here