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

Ralf Stubner ralf.stubner at physik.uni-erlangen.de
Sat Jun 24 16:39:44 CEST 2006


Jonathan Kew <jonathan_kew at sil.org> writes:

> So in both cmr10 and cmr12, the extra-space value seems to be the  
> same as the shrink value, at 1/3 of the space width (not 1/6, as  
> suggested above).

That's also what can be found in the TFM files, eg:

$ tftopl cmr10.tfm | egrep -A 7 FONTDIMEN
(FONTDIMEN
   (SLANT R 0.0)
   (SPACE R 0.333334)
   (STRETCH R 0.166667)
   (SHRINK R 0.111112)
   (XHEIGHT R 0.430555)
   (QUAD R 1.000003)
   (EXTRASPACE R 0.111112)

> What's interesting about this (besides the fact that xetex's extra- 
> space value does look excessive!) is the considerable difference  
> between the fontdimens from ptmr.tfm and ptmr8r.tfm. And neither of  
> the ptmr*.tfm versions corresponds with the ratios suggested above!

I *think* ptmr.tfm is a left-over from an old PSNFSS release, while
ptmr8r.tfm is from current PSNFSS. I know that current PSNFSS uses
fontinst for creating the metrics which uses

,----[ t1.etx ]
| \setint{stretchword}{\scale{\int{interword}}{600}}
| \setint{shrinkword}{\scale{\int{interword}}{240}}
| \setint{extraspace}{\scale{\int{interword}}{240}}
`----

, ie, STRETCH = 600/1000 SPACE and SHRINK = EXTRASPACE = 240/1000 SPACE
as default values. I don't know if there is any rationale behind these
values:

,----[ t1.etx ]
| \comment{The remaining code in this section sets various metric 
| parameters for the font. Ideally, all these parameters should already  
| have been set; the values computed here are merely crude guesses 
| about what might be the right value.}
`----

> However, it does look as though a change to xetex's default fontdimen  
> calculations would be appropriate. At least, fontdimen 7 (extra  
> space) should be made the same as fontdimen 4 (shrink); 1/3*space is  
> probably a reasonable value for this.

ACK

> How about fontdimen 3  
> (stretch).... should we reduce this from 2/3 to 1/2? This would tend  
> to give more consistent spacing, but would also increase the  
> likelihood of xetex reporting overfull/underfull boxes where it is  
> unable to achieve a good enough paragraph layout.

1/2 is definitely appropriate for most English texts. I don't know if
this is true for other scripts, though. I know that when staying within
the Latin script, changing from English to German with its long words
makes justification more difficult. If this also occurs in other
languages or scripts, staying with stretch at 2/3 or reducing only to
3/5 might be more appropriate.

cheerio
ralf



More information about the XeTeX mailing list