For those who want a complete working example based on Yiannis' code, here is
one, to be compiled with "xetex -ini -etex test.tex" and in which the arabic
"word" is hyphenated at every letter.

Thank you Yannis and others.

Bruno


On 3/25/21 6:50 PM, Yannis Haralambous wrote:
> Silly of me, when adding the \lccode information also in the TeX file… it 
> works.
> And not only once
> in a word, but for all hyphenation points. I was persuaded having done so, but
> apparently I didn't. Anyway,
> now everything suddenly seems to work. Totally weird…
> 
\let\dump\relax
\input xelatex.ini

\begingroup
  \language=8 % how to do this better?
  \catcode"200D=11
  \lccode"200D="200D
  \patterns{
  ^^^^06431^^^^0643
  ^^^^200d1^^^^200d
  }
\endgroup

\documentclass{article}
\usepackage{polyglossia,fontspec}
\setdefaultlanguage{arabic}
\newfontfamily{\arabicfont}[Script=Arabic,Extension=.ttf,Scale=1.2]{Amiri-Regular}
\textwidth1mm
\begin{document}

\catcode"200D=11 %JOINER
\lccode"200D="200D
\lefthyphenmin1
\righthyphenmin1

\makeatletter\language8
\arabicfont

^^^^0643^^^^200d^^^^200d^^^^0643^^^^200d^^^^200d^^^^0643^^^^200d^^^^200d^^^^0643^^^^200d^^^^200d^^^^0643
^^^^0643^^^^200d^^^^200d^^^^0643^^^^200d^^^^200d^^^^0643^^^^200d^^^^200d^^^^0643^^^^200d^^^^200d^^^^0643
^^^^0643^^^^0643^^^^0643^^^^0643^^^^0643
^^^^0643^^^^0643^^^^0643^^^^0643^^^^0643

blabla
blabla
bla^^^^200d^^^^200dbla
bla^^^^200d^^^^200dbla

\end{document}

Reply via email to