# letterspace does not work with XeTeX

I'm trying to recreate a document. While i have the font that was used, the kerning comes out a little different from what it is in the original (which was created using some DTP program i do not own). To my eye it would be fixed by slightly extending the letter spacing globally. I need to use XeTeX because of Asian fonts used, which limits my ablitiy to use some packages otherwise used for something like this.

I tried with the fontspec package (in the MWE i used Arial because it is ttf like the proprietary font i need to use), but the letterspace option does not seem to do anything, yet there also are no errors in the compilation (I am using TeXworks). The font comes out as Arial, but no extra spacing occurs (i used 500 to be extra visible).

What am i doing wrong?

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Arial}
\fontspec{Arial}
\addfontfeature{LetterSpace=500.0}

\begin{document}
Hello World
\end{document}

• If i use defaultfontfeature for LetterSpace before setmainfont, it works. Don't know why, though. Apr 16 '20 at 7:03

## 1 Answer

\fontspec and addfontfeature are for local effects. So use them only in the document body:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Arial}

\begin{document}
Hello World {\addfontfeature{LetterSpace=500.0} Hello World}
\end{document}


If you want to letterspace a font generally, add it as optional argument:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Arial}[LetterSpace=50]

\begin{document}
Hello World
\end{document}


• Thanks a lot! The addfontfeature indeed works for me if used after the begin{document} - i had never tried that because in my actual document the whole thing is located in a class file. ... and i had already tried invoking it as an argument in setmainfont, but was foiled by my usage: setmainfont[LetterSpace=50]{Arial} - which is how i can use most \command[arg]{main_arg} features. Not this one, it seems. Apr 16 '20 at 9:29