[XeTeX] \sloppy or \tolerance with fontspec

Sat Mar 7 20:21:27 CET 2009

On 7 Mar 2009, at 14:04, John Hughes wrote:

> When I compile a LaTeX document with XeLaTeX and the fontspec package,
> \sloppy, \sloppypar and \tolerance (set to any value) have no effect.
> The commands work fine with LaTeX, pdfLaTeX, and XeLaTeX without
> fontspec. I am using MikTeX 2.7 on Windows. Is this a feature or a bug
> in fontspec? Is there a way of changing the tolerance in XeTeX with
> fontspec?

I don't think fontspec touches \tolerance. With an example like:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\usepackage{lipsum}
\begin{document}

\lipsum[4]

\sloppy
\lipsum[4]

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

I see \sloppy having the expected effect (the first paragraph has an
overfull hbbox; the second doesn't, but has some worse spacing).
Perhaps the particular combinations of text and fonts you were using
just didn't happen to come out any different with changed \tolerance?

JK