[XeTeX] Follow-up to previous mail about hyphenation

Jonathan Kew jfkthame at gmail.com
Thu Mar 25 11:40:47 CET 2021


On 25/03/2021 10:22, Yannis Haralambous wrote:
> When I run the same file with Amiri:
> 
> % !TeX Program=Ini-XeTeX
> 
> \catcode `\ = 10
> \catcode `\         = 10
> \catcode `\{ = 1
> \catcode `\} = 2
> \catcode `\^ = 7
> \font\tenrm="Amiri-Regular.ttf"
> \tenrm
> 
> \lccode "200D = "200D
> \patterns {^^^^200d1^^^^200d}
> 
> \def \showhyphens
>          {
>                  \setbox 0 = \vbox
>                          {
>                                  \parfillskip = 0 pt
>                                  \hsize = \dimen 10
>                                  \tenrm
>                                  \pretolerance = -1
>                                  \tolerance = -1
>                                  \hbadness = 0
>                                  \showboxdepth = 0 \ #1
>                          }
>          }
> 
> \lccode "200D = "200D
> \catcode "200D = 11
> bla^^^^200d^^^^200dbla
> \showhyphens {bla^^^^200d^^^^200dbla}
> 
> \end
> 
> I get three pages, one with blabla, one with bla and a box, and another 
> with bla.
> Maybe \showhyphens is not correctly defined in the code above?

Indeed, that \showhyphens will not work with native opentype fonts. This 
is a known difference between using TFM-based vs OT fonts; it's been 
discussed (and an alternative shown) on the list somewhere in the 
distant past.

The output you're getting shows that the hyphenation is in fact 
happening as expected. (To get a hyphen rather than a box, you need to 
set the font's \hyphenchar appropriately.)


> 
>> Le 25 mars 2021 à 11:20, Philip Taylor <P.Taylor at Hellenic-Institute.Uk 
>> <mailto:P.Taylor at Hellenic-Institute.Uk>> a écrit :
>>
>> Philip Taylor wrote:
>>
>>> And I see no significant font using Amiri —
>>
>> "no significant /*difference */...".
> 
> IMT Atlantique <http://www.imt-atlantique.fr>	
> *Yannis HARALAMBOUS*
> Professor
> Computer Science Department
> UMR CNRS 6285 Lab-STICC
> Site web IMT Atlantique 
> <http://perso.telecom-bretagne.eu/yannisharalambous/>Twitter IMT 
> Atlantique <https://twitter.com/y_haralambous>LinkedIn IMT Atlantique 
> <https://www.linkedin.com/in/yannis-haralambous-5529073?trk=hp-identity-name>
> Technopôle Brest-Iroise CS 83818
> 29238 Brest Cedex 3, France
> Une école del'IMT <http://www.imt.fr>
> 
> /Und nach einer kleinen Stille fügte Sie hinzu:
> Jeder Weg, der dorthin führt, war am Ende der richtige./     (Michael Ende)
> 
> 



More information about the XeTeX mailing list.