[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The hyphenchar ligature in T1



On Mon, 2 November 1998 17:07:21 +0100,
Lars Hellström <Lars.Hellstrom@math.umu.se> writes:
 > For a while now, I have been curious about the
 > 
 >    hyphen (\char45)  +  hyphenchar (\char127)  ->  hyphenchar
 > 
 > ligature in T1 encoded fonts. I have some questions related to this
 > ligature, that I hope someone answer:

T1 encoded fonts contain two glyphs for a hyphen.  Using EC fonts, the
second hyphen glyph at position 127 is ``hanging''.


 > 1. When is this ligature ever used?
[...]

If \hyphenchar\font=127 and a combined word with an explicit hyphen
(i.e. hyphen glyph at position 45) is used, this ligature is
necessary, otherwise two hyphens will appear at a line break.  This
case is very often in languages like german where very long combined
words with or without explicit hyphen are usual
(``Donau-Dampfschiffahrtskapit\"anspatent-Anwartschaft'' ;-).


 > 2. Would anything be different if the ligature was
 >    hyphen  +  hyphenchar  ->  hyphen
 > instead?
 > 
 > If hyphen and hyphenchar are the same glyph then the printed output will
 > look the same in both cases, and if they are different then would it not be
 > more reasonable that the output contains the explicit hyphen that the user
 > actually typed instead of a hyphenchar? I suspect that it may be the case
 > that TeX does not use the same penalty for a linebreak after a hyphen in
 > the two cases (but I haven't bothered to check).

The glyphs are the same, but the font metric of the glyph is
different.  The glyph at position 127 is ``hanging'' thus you should
better use the ``hyphenchar'' to get hanging punctuation w.r.t. the
hyphen.

Best wishes,
  -bernd