# Interword Spacing in XeTeX is not functioning (Fontdimen)

in Default Lyx PDF output, (I presumed it is pdflatex), I used fontdimen2/3/4 to control the interword space, stretch and shrink. In a project, I had to use XeTeX for a particular font. However, the fontdimen2/3/4 doesn't work on the regular text anymore under XeTeX. Only works on fancyhdr.

My Preamble as regards to the text sizes are following:

 %Set word space
\usepackage{everysel}
\EverySelectfont{%
\fontdimen2\font=0.15em% interword space
\fontdimen3\font=0.15em% interword stretch
\fontdimen4\font=0.1em% interword shrink
}

%set font size
\renewcommand{\normalsize}{\fontsize{8pt}{8.5pt}\selectfont}
\renewcommand{\large}{\fontsize{20pt}{21pt}\selectfont}


In order to test the functioning, I set all fontdimen to 0, as you observed in the following example, only the fancyhdr is affected. the font I am using is Van Dijck MT Std with Old Style Figures on.

-
@DavidCarlisle accidentally pasted that in, wasn't being relevant, thanks for pointing it out. –  Shi Yuan Oct 2 '12 at 15:43
You should supply an example, in particular the font you're using. Notice that special spacing is used when XeCJK is involved. –  egreg Oct 2 '12 at 16:05
@egreg thanks for the suggestion, I have updated the question. –  Shi Yuan Oct 3 '12 at 11:49
Did you try with other fonts? –  egreg Oct 3 '12 at 11:59
@egreg, just tried Adobe Garamond, Adobe Caslon and the Arial, all have the same problem. –  Shi Yuan Oct 3 '12 at 12:18

my own problem, found the answer. I used ragged2e to make the type set ragging right. However, it needs to be placed under the everysel. if everysel is before ragged2e, the fontdimen won't work.
Which shows why we always ask for a minimal working example (MWE). In this particular case, ragged2e uses \spaceskip for the interword spacing, so the \fontdimen parameters are ignored. –  egreg Oct 3 '12 at 12:43