Consider this rather ghastly line in some fully justified text:
You can see how it has been truncated, or at least there is extra space to the right. This is because I have turned off letter spacing for this example. There is no better line break (for the purposes of this discussion) and so there is nowhere to insert extra space and so we get an under full box. But who would do this. Surely they would turn on letter spacing. So let's turn on a tiny amount: 0.5%:
Yuk. That's way more than 0.5% maximum stretch. What's going on? Well XeTeX needs to decide what to do about spacing a really bad break like this. In fact it has a special pass that in effect says to the line breaker: you have an extra 1in per line (set via \emergencystretch=1in by default) so if you can justify based on that, go for it. And 0.5% adds just enough intercharacter space to get us under needing 1in extra space. Now the line is spread out and all that emergency stretch is distributed among all those stretches, regardless of any maximum we might have set on the stretch, and the intercharacter space looks super wide and spread out.
Is this the best we can do? Consider yourselves blessed all those who work with shorter 'words' and don't have to deal with lack of interword breaks. Thankfully this text is marked with wordbreaks which are turned into ZWSP. ZWSP is defined as taking the intercharacter spacing, so we can be sneaky and turn of letter spacing while still keeping the intercharacter space for ZWSP. We do this by adding the line:
```
\def\intercharspace{\leavevmode\nobreak\hskip\intercharskip}
```
to our ptxprint-mods.tex (since turning off letter spaces comments it out from the job .tex file). Now what do we get if we turn off letter spacing again?
Hmm not much better but at least the text is broken on words rather than grapheme clusters. This may or may not be preferable. But there is no nice solution. This is about making the best of a bad job.
Comments welcome so long as you don't say: don't break there then! (Which of course is the right solution, but may not always be available given the time we have)