[XeTeX] Typographical question: xetex' default wordspacing (\fontdimen2--7)

Toralf Senger Senger at mpimp-golm.mpg.de
Sat Jun 24 00:55:52 CEST 2006


Hi,

While I was chasing the problem that XeTeX still did not produce the same output as pdftex, I stumbled over fontdimes being the culprit: XeTeX defines them as follows:
\fontdimen2 (space)  =width of space <--thats fine
\fontdimen3 (stretch)=2/3 of space   <--too much?
\fontdimen4 (shrink) =1/3 of space   <--thats fine
\fontdimen7 (extra spaces)= 2/3 of space  <--way to much?

I converted some of D.E. Knuths Computer Modern Font TFMs (e.g. cmr12.tfm) to readable *.pl and found, what you can also read for example here http://www.delorie.com/gnu/docs/fontutils/fontu_63.html :

\fontdimen2 (space)  =width of space
\fontdimen3 (stretch)=1/2 of space  <---different to XeTeX
\fontdimen4 (shrink) =1/3 of space
\fontdimen7 (extra spaces)= 1/6 of space  <---different to XeTeX

In some Adobe TFMs I also found 'stretch' to be 2/3 of 'space' (like XeTeX) and 'extra space' to be 1/3 of 'space' (but never 2/3). OTFtoTFM (LCDF Typetools) is doing it like recommended by the creators of 'font utilities' (webpage above)-which explains the difference between the XeTeX and PDFTeX output I have, because I used that tool for generating the TFMs for PDFTeX. That raises the question: Is there any typographical guideline how to define them? I personally find 'stretch' to be 2/3 of 'space' to much, because the lines look to unbalanced when one line has 5/3 inter-word space and the next line 2/3 of inter-word space. Therefore I redefined the fontdimens (similar to fontspecs \zf at adjust) and voila--I get the same output as in PDFtex where I generated the TFMs with OTFtoTFM. (Note that fontspec users can do the same by issuing WordSpace={1,0.75,0.25} as option, which bents the predefined values to the above values.)

TS


More information about the XeTeX mailing list