[XeTeX] Hyphenation of "--" with tex-text mapping on

Will Robertson will at guerilla.net.au
Tue Nov 29 03:44:16 CET 2005

On 25/11/2005, at 6pm, Jonathan Kew wrote:

> On 25 Nov 2005, at 12:34 am, Will Robertson wrote:
>> Sorry to be dense, but if font mappings aren't involved with line  
>> breaking, how on earth does justification still work correctly?  
>> Won't the line break be determined based on the width of "--",  
>> which will later change after conversion to "–"?
> No, because the font mapping will be applied when the width of "--"  
> is measured, just as it is applied when the "--" is rendered to the  
> output.
> But TeX looks for line-break positions in the underlying text  
> (sequence of characters and glue, mainly), and the font mapping  
> doesn't change that. (I considered implementing this differently,  
> but that would lead to other issues....)

I suppose it is implemented this way so that hyphenation works for  
scripts when the font mapping is performing contextual re-arrangement  
and so on; it wouldn't be very useful to only either to have the  
correct word shapes OR hyphenation!

It is unfortunate that an em-dash can be hyphenated in this manner,  
though: do you consider this a bug that might one day be fixed, or is  
it a design decision that cannot be changed? If the latter, I'll make  
a note in the fontspec documentation telling people to avoid using it  
except for legacy documents...



More information about the XeTeX mailing list