texlive[55365] Master/texmf-dist: xepersian-hm (31may20)

commits+karl at tug.org commits+karl at tug.org
Sun May 31 23:12:25 CEST 2020


Revision: 55365
          http://tug.org/svn/texlive?view=revision&revision=55365
Author:   karl
Date:     2020-05-31 23:12:25 +0200 (Sun, 31 May 2020)
Log Message:
-----------
xepersian-hm (31may20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/INSTALL.txt
    trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-glyph-example.pdf
    trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-glyph-example.tex
    trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-xep-XB-example.pdf
    trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-xep-XB-example.tex
    trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/xepersian-hm-doc.ltx
    trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/xepersian-hm-doc.pdf
    trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/xepersian-hm.pdf
    trunk/Master/texmf-dist/source/xelatex/xepersian-hm/xepersian-hm.dtx
    trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/kashida-xepersian-hm.def
    trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-glyph-example.pdf
    trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-glyph-example.tex
    trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-hrule-example.pdf
    trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-hrule-example.tex

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-hrule-example.pdf
    trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-hrule-example.tex

Modified: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/INSTALL.txt
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/INSTALL.txt	2020-05-31 21:12:05 UTC (rev 55364)
+++ trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/INSTALL.txt	2020-05-31 21:12:25 UTC (rev 55365)
@@ -29,10 +29,11 @@
 The example files
 
     kashida-glyph-example.tex
-    kashida-hrule-example.tex
+    kashida-leaders-glyph-example.tex
+    kashida-leaders-hrule-example.tex
     kashida-xep-XB-example.tex
 
 illustrate some features of the package and are an addendum to the
 main documentation xepersian-hm.pdf.
 
-Thats it.
+That's it.

Modified: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-glyph-example.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-glyph-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-glyph-example.tex	2020-05-31 21:12:05 UTC (rev 55364)
+++ trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-glyph-example.tex	2020-05-31 21:12:25 UTC (rev 55365)
@@ -29,6 +29,9 @@
 \defpersianfont\HMXKayhanOb[Scale=4.5]{HM XKayhanOb Oblique}
 \defpersianfont\HMXKayhanOl[Scale=4.5]{HM XKayhan Outline}
 \defpersianfont\HMXKayhanSd[Scale=4.5]{HM XKayhan Shadow}
+\defpersianfont\HMXKayhanPo[Scale=4.5]{HM XKayhan Pook}
+\defpersianfont\HMXKayhanSa[Scale=4.5]{HM XKayhan Sayeh}
+\defpersianfont\HMXKayhanNa[Scale=4.5]{HM XKayhan Navaar}
 
 % \def\SampleText{\discouragebadlinebreaks[8][0.14 em plus 5.5 em]{
 %   راهی جایی تابی چاپی چاههی تلاشهایی
@@ -107,4 +110,22 @@
 
 {\HMXKayhanSd \SampleText}
 
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Pook)}\hfill}
+
+{\HMXKayhanPo \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Sayeh)}\hfill}
+
+{\HMXKayhanSa \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Navaar)}\hfill}
+
+{\HMXKayhanNa \SampleText}
+
 \end{document}

Deleted: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-hrule-example.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-hrule-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-hrule-example.tex	2020-05-31 21:12:05 UTC (rev 55364)
+++ trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-hrule-example.tex	2020-05-31 21:12:25 UTC (rev 55365)
@@ -1,109 +0,0 @@
-% \PassOptionsToPackage{debugfootnotedirection=off,localise=off}{xepersian}  % Load xepersian with a few options
-\documentclass{report}
-% \textwidth=345.0pt
-% \textheight=550.0pt
-% \textheight=620pt
-% \usepackage[Kashida]{xepersian}  % Fails
-% \usepackage{xepersian-hm}  % Succeeds
-\usepackage[Kashida=hrule,kashidastretch=0.14 em plus 0.5 em]{xepersian-hm}  % Succeeds
-% \usepackage[Kashida=hrule,kashidastretch=0.14 em plus 5.5 em]{xepersian-hm}  % Succeeds
-% \usepackage[Kashida=glyph,linebreakpenalty=8,kashidastretch=0.14 em plus 5.5 em]{xepersian-hm}  % Succeeds
-% \usepackage[Kashida=glyph,kashidastretch=kayhan]{xepersian-hm}  % Succeeds
-% \usepackage[Kashida,kashidastretch=0.14 em plus 0.5 em]{xepersian-hm}  % Succeeds
-% \usepackage[Kashida,kashidastretch=noskip]{xepersian-hm}  % Succeeds
-% \usepackage[Kashida,kashidastretch=default]{xepersian-hm}  % Succeeds
-% \usepackage[Kashida,kashidastretch=kayhan]{xepersian-hm}  % Succeeds
-% \usepackage[Kashida,kashidastretch=khorramshahr]{xepersian-hm}  % Succeeds
-
-% \settextfont[Scale=4.5,Colour=darkgray]{XB Kayhan}
-\settextfont[Scale=4.5]{HM XKayhan}
-% \settextfont[Scale=4.5,Colour=darkgray]{HM XNiloofar} 
-% \settextfont[Scale=4.5,Colour=darkgray]{HM XYas} 
-% \settextfont[Scale=4.5,Colour=darkgray]{HM XZar} 
-% \settextfont[Scale=1,Colour=darkgray]{HM XKayhan}
-
-% \setlatintextfont[Scale=2.5,Colour=0000FF]{XB Kayhan}
-\setlatintextfont[Scale=1.5,Colour=0000FF]{HM XKayhan}
-
-\defpersianfont\HMXKayhanIt[Scale=4.5]{HM XKayhan Italic}
-\defpersianfont\HMXKayhanOb[Scale=4.5]{HM XKayhanOb Oblique}
-\defpersianfont\HMXKayhanOl[Scale=4.5]{HM XKayhan Outline}
-\defpersianfont\HMXKayhanSd[Scale=4.5]{HM XKayhan Shadow}
-
-% \def\SampleText{\discouragebadlinebreaks[8][0.14 em plus 5.5 em]{
-%   راهی جایی تابی چاپی چاههی تلاشهایی
-%   شتابهایی تابی چاپی راهی تلاشهــایی
-%   که کتابهایی که کلاههایی که کتابهایی }}
-
-% \def\SampleText{\discouragebadlinebreaks[10][0.12 em plus 5.5 em]{
-%   راهی جایی تابی چاپی چاههی تلاشهایی
-%   شتابهایی تابی چاپی راهی تلاشهــایی
-%   که کتابهایی که کلاههایی که کتابهایی }}
-
-% \def\SampleText{\discouragebadlinebreaks{
-%   راهی جایی تابی چاپی چاههی تلاشهایی
-%   شتابهایی تابی چاپی راهی تلاشهــایی
-%   که کتابهایی که کلاههایی که کتابهایی }}
-
-\def\SampleText{
-  راهی جایی تابی چاپی چاههی تلاشهایی
-  شتابهایی تابی چاپی راهی تلاشهــایی
-  که کتابهایی که کلاههایی که کتابهایی }
-
-\setlength\parindent{0pt}
-\pagestyle{empty}
-
-\begin{document}
-
-\begin{latin}
-\begin{center}
-\Huge\textsf{xepersian-hm}\vspace{20pt}\\ Example of Use\vspace{20pt}\\  \texttt{Kashida=hrule} \vspace{40pt}
-
-{\Large
-\begin{tabular}{ll}
-  \textsf{Font:} & \textsf{HM XKayhan} \\
-  \textsf{Font Scale:} & \texttt{4.5} \\
-  \textsf{kashidastretch:} & \texttt{0.14em plus 0.5em}
-\end{tabular}
-}
-\end{center}
-
-\end{latin}
-
-\newpage
-
-\KashidaOff{\hfill\lr{(Kashida Off, Regular)}\hfill}
-
-\SampleText
-
-\newpage
-
-\KashidaOn{\hfill\lr{(Kashida On, Regular)}\hfill}
-
-\SampleText
-
-\newpage
-
-\KashidaOn{\hfill\lr{(Kashida On, Italic)}\hfill}
-
-{\HMXKayhanIt \SampleText}
-
-\newpage
-
-\KashidaOn{\hfill\lr{(Kashida On, Oblique)}\hfill}
-
-{\HMXKayhanOb \SampleText}
-
-\newpage
-
-\KashidaOn{\hfill\lr{(Kashida On, Outline)}\hfill}
-
-{\HMXKayhanOl \SampleText}
-
-\newpage
-
-\KashidaOn{\hfill\lr{(Kashida On, Shadow)}\hfill}
-
-{\HMXKayhanSd \SampleText}
-
-\end{document}

Added: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-glyph-example.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-glyph-example.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-glyph-example.pdf	2020-05-31 21:12:05 UTC (rev 55364)
+++ trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-glyph-example.pdf	2020-05-31 21:12:25 UTC (rev 55365)

Property changes on: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-glyph-example.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-glyph-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-glyph-example.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-glyph-example.tex	2020-05-31 21:12:25 UTC (rev 55365)
@@ -0,0 +1,130 @@
+% \PassOptionsToPackage{debugfootnotedirection=off,localise=off}{xepersian}  % Load xepersian with a few options
+\documentclass{report}
+% \textwidth=345.0pt
+% \textheight=550.0pt
+% \textheight=620pt
+% \usepackage[Kashida]{xepersian}  % Fails
+% \usepackage{xepersian-hm}  % Succeeds
+\usepackage[Kashida=leaders+glyph,kashidastretch=0.14 em plus 0.5 em]{xepersian-hm}  % Succeeds
+% \usepackage[Kashida=hrule,kashidastretch=0.14 em plus 5.5 em]{xepersian-hm}  % Succeeds
+% \usepackage[Kashida=glyph,linebreakpenalty=8,kashidastretch=0.14 em plus 5.5 em]{xepersian-hm}  % Succeeds
+% \usepackage[Kashida=glyph,kashidastretch=kayhan]{xepersian-hm}  % Succeeds
+% \usepackage[Kashida,kashidastretch=0.14 em plus 0.5 em]{xepersian-hm}  % Succeeds
+% \usepackage[Kashida,kashidastretch=noskip]{xepersian-hm}  % Succeeds
+% \usepackage[Kashida,kashidastretch=default]{xepersian-hm}  % Succeeds
+% \usepackage[Kashida,kashidastretch=kayhan]{xepersian-hm}  % Succeeds
+% \usepackage[Kashida,kashidastretch=khorramshahr]{xepersian-hm}  % Succeeds
+
+% \settextfont[Scale=4.5,Colour=darkgray]{XB Kayhan}
+\settextfont[Scale=4.5]{HM XKayhan}
+% \settextfont[Scale=4.5,Colour=darkgray]{HM XNiloofar} 
+% \settextfont[Scale=4.5,Colour=darkgray]{HM XYas} 
+% \settextfont[Scale=4.5,Colour=darkgray]{HM XZar} 
+% \settextfont[Scale=1,Colour=darkgray]{HM XKayhan}
+
+% \setlatintextfont[Scale=2.5,Colour=0000FF]{XB Kayhan}
+\setlatintextfont[Scale=1.5,Colour=0000FF]{HM XKayhan}
+
+\defpersianfont\HMXKayhanIt[Scale=4.5]{HM XKayhan Italic}
+\defpersianfont\HMXKayhanOb[Scale=4.5]{HM XKayhanOb Oblique}
+\defpersianfont\HMXKayhanOl[Scale=4.5]{HM XKayhan Outline}
+\defpersianfont\HMXKayhanSd[Scale=4.5]{HM XKayhan Shadow}
+\defpersianfont\HMXKayhanPo[Scale=4.5]{HM XKayhan Pook}
+\defpersianfont\HMXKayhanSa[Scale=4.5]{HM XKayhan Sayeh}
+\defpersianfont\HMXKayhanNa[Scale=4.5]{HM XKayhan Navaar}
+
+% \def\SampleText{\discouragebadlinebreaks[8][0.14 em plus 5.5 em]{
+%   راهی جایی تابی چاپی چاههی تلاشهایی
+%   شتابهایی تابی چاپی راهی تلاشهــایی
+%   که کتابهایی که کلاههایی که کتابهایی }}
+
+% \def\SampleText{\discouragebadlinebreaks[10][0.12 em plus 5.5 em]{
+%   راهی جایی تابی چاپی چاههی تلاشهایی
+%   شتابهایی تابی چاپی راهی تلاشهــایی
+%   که کتابهایی که کلاههایی که کتابهایی }}
+
+% \def\SampleText{\discouragebadlinebreaks{
+%   راهی جایی تابی چاپی چاههی تلاشهایی
+%   شتابهایی تابی چاپی راهی تلاشهــایی
+%   که کتابهایی که کلاههایی که کتابهایی }}
+
+\def\SampleText{
+  راهی جایی تابی چاپی چاههی تلاشهایی
+  شتابهایی تابی چاپی راهی تلاشهــایی
+  که کتابهایی که کلاههایی که کتابهایی }
+
+\setlength\parindent{0pt}
+\pagestyle{empty}
+
+\begin{document}
+
+\begin{latin}
+\begin{center}
+\Huge\textsf{xepersian-hm}\vspace{20pt}\\ Example of Use\vspace{20pt}\\  \texttt{Kashida=hrule} \vspace{40pt}
+
+{\Large
+\begin{tabular}{ll}
+  \textsf{Font:} & \textsf{HM XKayhan} \\
+  \textsf{Font Scale:} & \texttt{4.5} \\
+  \textsf{kashidastretch:} & \texttt{0.14em plus 0.5em}
+\end{tabular}
+}
+\end{center}
+
+\end{latin}
+
+\newpage
+
+\KashidaOff{\hfill\lr{(Kashida Off, Regular)}\hfill}
+
+\SampleText
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Regular)}\hfill}
+
+\SampleText
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Italic)}\hfill}
+
+{\HMXKayhanIt \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Oblique)}\hfill}
+
+{\HMXKayhanOb \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Outline)}\hfill}
+
+{\HMXKayhanOl \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Shadow)}\hfill}
+
+{\HMXKayhanSd \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Pook)}\hfill}
+
+{\HMXKayhanPo \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Sayeh)}\hfill}
+
+{\HMXKayhanSa \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Navaar)}\hfill}
+
+{\HMXKayhanNa \SampleText}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-glyph-example.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-hrule-example.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-hrule-example.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-hrule-example.pdf	2020-05-31 21:12:05 UTC (rev 55364)
+++ trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-hrule-example.pdf	2020-05-31 21:12:25 UTC (rev 55365)

Property changes on: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-hrule-example.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-hrule-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-hrule-example.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-hrule-example.tex	2020-05-31 21:12:25 UTC (rev 55365)
@@ -0,0 +1,130 @@
+% \PassOptionsToPackage{debugfootnotedirection=off,localise=off}{xepersian}  % Load xepersian with a few options
+\documentclass{report}
+% \textwidth=345.0pt
+% \textheight=550.0pt
+% \textheight=620pt
+% \usepackage[Kashida]{xepersian}  % Fails
+% \usepackage{xepersian-hm}  % Succeeds
+\usepackage[Kashida=leaders+hrule,kashidastretch=0.14 em plus 0.5 em]{xepersian-hm}  % Succeeds
+% \usepackage[Kashida=hrule,kashidastretch=0.14 em plus 5.5 em]{xepersian-hm}  % Succeeds
+% \usepackage[Kashida=glyph,linebreakpenalty=8,kashidastretch=0.14 em plus 5.5 em]{xepersian-hm}  % Succeeds
+% \usepackage[Kashida=glyph,kashidastretch=kayhan]{xepersian-hm}  % Succeeds
+% \usepackage[Kashida,kashidastretch=0.14 em plus 0.5 em]{xepersian-hm}  % Succeeds
+% \usepackage[Kashida,kashidastretch=noskip]{xepersian-hm}  % Succeeds
+% \usepackage[Kashida,kashidastretch=default]{xepersian-hm}  % Succeeds
+% \usepackage[Kashida,kashidastretch=kayhan]{xepersian-hm}  % Succeeds
+% \usepackage[Kashida,kashidastretch=khorramshahr]{xepersian-hm}  % Succeeds
+
+% \settextfont[Scale=4.5,Colour=darkgray]{XB Kayhan}
+\settextfont[Scale=4.5]{HM XKayhan}
+% \settextfont[Scale=4.5,Colour=darkgray]{HM XNiloofar} 
+% \settextfont[Scale=4.5,Colour=darkgray]{HM XYas} 
+% \settextfont[Scale=4.5,Colour=darkgray]{HM XZar} 
+% \settextfont[Scale=1,Colour=darkgray]{HM XKayhan}
+
+% \setlatintextfont[Scale=2.5,Colour=0000FF]{XB Kayhan}
+\setlatintextfont[Scale=1.5,Colour=0000FF]{HM XKayhan}
+
+\defpersianfont\HMXKayhanIt[Scale=4.5]{HM XKayhan Italic}
+\defpersianfont\HMXKayhanOb[Scale=4.5]{HM XKayhanOb Oblique}
+\defpersianfont\HMXKayhanOl[Scale=4.5]{HM XKayhan Outline}
+\defpersianfont\HMXKayhanSd[Scale=4.5]{HM XKayhan Shadow}
+\defpersianfont\HMXKayhanPo[Scale=4.5]{HM XKayhan Pook}
+\defpersianfont\HMXKayhanSa[Scale=4.5]{HM XKayhan Sayeh}
+\defpersianfont\HMXKayhanNa[Scale=4.5]{HM XKayhan Navaar}
+
+% \def\SampleText{\discouragebadlinebreaks[8][0.14 em plus 5.5 em]{
+%   راهی جایی تابی چاپی چاههی تلاشهایی
+%   شتابهایی تابی چاپی راهی تلاشهــایی
+%   که کتابهایی که کلاههایی که کتابهایی }}
+
+% \def\SampleText{\discouragebadlinebreaks[10][0.12 em plus 5.5 em]{
+%   راهی جایی تابی چاپی چاههی تلاشهایی
+%   شتابهایی تابی چاپی راهی تلاشهــایی
+%   که کتابهایی که کلاههایی که کتابهایی }}
+
+% \def\SampleText{\discouragebadlinebreaks{
+%   راهی جایی تابی چاپی چاههی تلاشهایی
+%   شتابهایی تابی چاپی راهی تلاشهــایی
+%   که کتابهایی که کلاههایی که کتابهایی }}
+
+\def\SampleText{
+  راهی جایی تابی چاپی چاههی تلاشهایی
+  شتابهایی تابی چاپی راهی تلاشهــایی
+  که کتابهایی که کلاههایی که کتابهایی }
+
+\setlength\parindent{0pt}
+\pagestyle{empty}
+
+\begin{document}
+
+\begin{latin}
+\begin{center}
+\Huge\textsf{xepersian-hm}\vspace{20pt}\\ Example of Use\vspace{20pt}\\  \texttt{Kashida=hrule} \vspace{40pt}
+
+{\Large
+\begin{tabular}{ll}
+  \textsf{Font:} & \textsf{HM XKayhan} \\
+  \textsf{Font Scale:} & \texttt{4.5} \\
+  \textsf{kashidastretch:} & \texttt{0.14em plus 0.5em}
+\end{tabular}
+}
+\end{center}
+
+\end{latin}
+
+\newpage
+
+\KashidaOff{\hfill\lr{(Kashida Off, Regular)}\hfill}
+
+\SampleText
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Regular)}\hfill}
+
+\SampleText
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Italic)}\hfill}
+
+{\HMXKayhanIt \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Oblique)}\hfill}
+
+{\HMXKayhanOb \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Outline)}\hfill}
+
+{\HMXKayhanOl \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Shadow)}\hfill}
+
+{\HMXKayhanSd \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Pook)}\hfill}
+
+{\HMXKayhanPo \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Sayeh)}\hfill}
+
+{\HMXKayhanSa \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Navaar)}\hfill}
+
+{\HMXKayhanNa \SampleText}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-leaders-hrule-example.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-xep-XB-example.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-xep-XB-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-xep-XB-example.tex	2020-05-31 21:12:05 UTC (rev 55364)
+++ trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/kashida-xep-XB-example.tex	2020-05-31 21:12:25 UTC (rev 55365)
@@ -7,6 +7,9 @@
 \defpersianfont\XBKayhanOb[Scale=4.5]{XB Zar Oblique}
 \defpersianfont\XBKayhanOl[Scale=4.5]{XB Kayhan Pook}
 \defpersianfont\XBKayhanSd[Scale=4.5]{XB Kayhan Sayeh}
+\defpersianfont\XBKayhanPo[Scale=4.5]{XB Kayhan Pook}
+\defpersianfont\XBKayhanSa[Scale=4.5]{XB Kayhan Sayeh}
+\defpersianfont\XBKayhanNa[Scale=4.5]{XB Kayhan Navaar}
 
 \def\SampleText{
   راهی جایی تابی چاپی چاههی تلاشهایی
@@ -68,4 +71,22 @@
 
 {\XBKayhanSd \SampleText}
 
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Pook)}\hfill}
+
+{\XBKayhanPo \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Sayeh)}\hfill}
+
+{\XBKayhanSa \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Navaar)}\hfill}
+
+{\XBKayhanNa \SampleText}
+
 \end{document}

Modified: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/xepersian-hm-doc.ltx
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/xepersian-hm-doc.ltx	2020-05-31 21:12:05 UTC (rev 55364)
+++ trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/xepersian-hm-doc.ltx	2020-05-31 21:12:25 UTC (rev 55365)
@@ -27,7 +27,7 @@
    }
 }
 
-\date{Released \quad 2020-05-20 \quad v0.5f}
+\date{Released \quad 2020-05-31 \quad v1.0a}
 
 \let\tmpthepage\thepage
 \renewcommand{\thepage}{\lr{\Large\textbf\tmpthepage}}
@@ -43,9 +43,14 @@
 \href{http://wiki.irmug.com/index.php/X_Series_2}{\texttt{http://wiki.irmug.com/index.php/X\_Series\_2}}.
 The \textsf{xepersian-hm} package fixes these problems.
 
-The files \texttt{kashida-glyph-example.tex} and \texttt{kashida-hrule-example.tex}
-in the directory \texttt{texmf-dist/doc/xelatex/xepersian-hm/} can be used as simple
-examples of the usage of the package.
+The following files in the directory \texttt{texmf-dist/doc/xelatex/xepersian-hm/} can be used as simple
+examples of the usage of the package:
+\newcounter{beanx}
+  \begin{list}{\arabic{beanx}.}{\usecounter{beanx}\setlength{\rightmargin}{\leftmargin}}
+  \item \texttt{kashida-glyph-example.tex}
+  \item \texttt{kashida-leaders-glyph-example.tex}
+  \item \texttt{kashida-leaders-hrule-example.tex}
+\end{list}
 
 Please use the Bitbucket issue tracker:
 \href{https://bitbucket.org/dma8hm1334/xepersian-hm/issues}{\textsf{https://bitbucket.org/dma8hm1334/\linebreak[4]xepersian-hm/issues}}
@@ -59,7 +64,7 @@
 
 Kashida is one of the most important features that must be included in any
 Persian typesetter. In xepersian this feature is implemented but with some
-problems. These problems along withe fixes in xepersian-hm are briefly:
+problems. These problems along with the fixes in \textsf{xepersian-hm} are briefly:
 
 \newcounter{bean}
   \begin{list}{P-\Roman{bean}}{\usecounter{bean}\setlength{\rightmargin}{\leftmargin}}
@@ -117,7 +122,7 @@
 
 \begin{figure}
   \centerline{\fbox{\includegraphics[scale=1]{doc-samples-xep.pdf}}}
-  \caption{Package: \textsf{xeprsian}, Font: \textsf{XB Kayhan}, \textsf{Scale=4.5}, \textsf{Kashida=0n}}
+  \caption{Package: \textsf{xeprsian}, Font: \textsf{XB Kayhan}, \textsf{Scale=4.5}, \textsf{Kashida=On}}
   \label{fig:xepersian-XB}
 \end{figure}
 
@@ -143,16 +148,16 @@
 \PassOptionsToPackage{debugfootnotedirection=off,localise=off}{xepersian}
 \documentclass{report}
 \usepackage{xcolor}
-\usepackage[Kashida,kashidastretch=0.14 em plus 0.5 em]{xepersian-hm}
+\usepackage[Kashida=leaders+glyph,kashidastretch=0.14 em plus 0.5 em]{xepersian-hm}
 \end{verbatim}
 
 The options available in \textsf{xepersian-hm} are:
 \begin{itemize}
   \item \texttt{Kashida}: \\
-    which implements kashida feature with two possible values:
+    which implements kashida feature with three possible values:
     \begin{itemize}
       \item \texttt{glyph}: \\
-        which uses the \texttt{Kashida} character to stretch the text.
+        which uses the \texttt{kashida} character to stretch the text.
         With this option you should run \texttt{xelatex} thrice. For example: \\
 
         \texttt{rm -f kashida-example.aux \\
@@ -161,19 +166,38 @@
         xelatex kashida-example.tex}
 
         Please note that this feature is still experimental and is not regarded as stable.
-        If you are going to use this option be ready for unpredictable results. Also, note
-        that the value of \texttt{Kashida} is mandatory.
+        If you are going to use this option be ready for unpredictable results.
 
-      \item \texttt{hrule}: \\
-        which uses a horizontal rule (\verb|\hrule|) to stretch the text.
+        Also note that with this option, for each gap which is to be filled with kashida,
+        some commands, current position on the page, and references are saved in the
+        \texttt{\bslash jobname.aux} file and if the text is long, the file size may get
+        too large.
 
+      \item \texttt{leaders+glyph}: \\
+        which uses kashida glyph leaders to stretch the text.
+        Please note that the option `Kashida=leaders+glyph' is currently only
+        supported by \mbox{\textsf{HM Series}} fonts available at
+        \href{https://dma8hm1334.bitbucket.io}{\texttt{https://dma8hm1334.bitbucket.io}}.
+        If you know of any other font that supports this option, please
+        let me know to add it to the list of corresponding fonts.
+
+        Contrary to the option \texttt{Kashida=glyph}, in this case nothing is saved
+        in \texttt{.aux} files.
+
+      \item \texttt{leaders+hrule}: \\
+        which uses horizontal rule (\verb|\hrule|) leaders to stretch the text.
+
     \end{itemize}
-    For example \texttt{Kashida=glyph} inserts a stretched \texttt{Kashida} glyph where ever it is needed.
+    Also, please note that the value of \texttt{Kashida} is mandatory.
+    For example \texttt{Kashida=glyph} inserts a stretched \texttt{kashida} glyph
+    and \linebreak[4] \texttt{Kashida=leaders+glyph} inserts \texttt{kashida} leaders  wherever
+    it is needed.
 
   \item \texttt{linebreakpenalty}: \\
     which specifies the amount of penalty for preventing bad line-breaking.
-    You may strictly specify the value of this option. For example \texttt{'linebreakpenalty=8'} or you
-    may use the default values. The available default values of penalties which are put into the
+    You may strictly specify the value of this option. For example you may either set % \linebreak[4]
+    \texttt{'linebreakpenalty=8'} or 
+    use the default values. The available default values of penalties which are put into the
     horizontal list output are the negative of the followings:
 
     \begin{longtable}{ll}
@@ -254,10 +278,12 @@
 
     {\it text} may not contain paragraph breaks.
     This command puts a penalty after each Persian word.
-    The optional arguments \texttt{linebreakpenalty} and \texttt{kashidastretch} locally specify the value of the penalty and the amount
-    of extra stretching for some combinations of characters respectively as discussed previously. For example:
+    The optional arguments \texttt{linebreakpenalty} and \texttt{kashidastretch} locally
+    specify the value of the penalty and the amount of extra stretching for some
+    combinations of characters respectively as discussed previously. For example
+    you may set this option as follows:
 
-    \texttt{\bslash discouragebadlinebreaks[9][0.12 em plus 0.5 em]\{\dots\}}
+    \texttt{\bslash discouragebadlinebreaks[9][0.12 em plus 0.5 em]\{$\dots\,$\}}
 \end{description}
 
 \section{Important notes}
@@ -266,7 +292,7 @@
   \item Kashida and ligatures:
 
     The method used to implement kashida feature breaks a ligature if it is applied to the letters which are joined to form
-    the ligature. This is fixed in \textsf{xepersian-hm}, but it is still immature.
+    the ligature. This is fixed in \textsf{xepersian-hm}, but it is not well developed yet.
 \end{description}
 
 \end{latin}

Modified: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/xepersian-hm-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/xelatex/xepersian-hm/xepersian-hm.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/xelatex/xepersian-hm/xepersian-hm.dtx
===================================================================
--- trunk/Master/texmf-dist/source/xelatex/xepersian-hm/xepersian-hm.dtx	2020-05-31 21:12:05 UTC (rev 55364)
+++ trunk/Master/texmf-dist/source/xelatex/xepersian-hm/xepersian-hm.dtx	2020-05-31 21:12:25 UTC (rev 55365)
@@ -67,7 +67,7 @@
 %    }^^A
 % }
 % 
-% \date{Released \quad 2020-05-20 \quad v0.5f}
+% \date{Released \quad 2020-05-31 \quad v1.0a}
 % 
 % \maketitle
 % 
@@ -96,8 +96,10 @@
 \RequirePackage{zref-savepos}[2020-03-03]
 \RequirePackage{xepersian}
 \ExplSyntaxOn
-\ProvidesExplPackage {xepersian-hm} {2020-05-20} {0.5f} { Fixes~issues~in~xepersian~package }
+\ProvidesExplPackage {xepersian-hm} {2020-05-31} {1.0a} { Fixes~issues~in~xepersian~package }
 
+\box_new:N \l_xephm_ksh_box
+
 \int_const:Nn \c_xephm_ksh_int {"0640} % kashida
 \int_const:Nn \c_xephm_lrm_int {"200E} % left-right-mark
 \int_const:Nn \c_xephm_zwj_int {"200D} % zero-width joiner
@@ -125,6 +127,9 @@
 \tl_new:N \l_xephm_main_font_full_tl
 \tl_new:N \l_xephm_main_font_name_tl
 
+\tl_new:N \l_xephm_font_full_tl
+\tl_new:N \l_xephm_font_name_tl
+
 \tl_new:N \l_xephm_skip_default_tl
 
 \tl_new:N \l_xephm_active_ligs_tl
@@ -144,7 +149,8 @@
 \int_set:Nn \l_xephm_max_penalty_int { 10000 }
 
 \tl_set:Nn \l_xephm_stretch_glyph_tl { glyph }
-\tl_set:Nn \l_xephm_stretch_hrule_tl { hrule }
+\tl_set:Nn \l_xephm_stretch_leaders_glyph_tl { leaders+glyph }
+\tl_set:Nn \l_xephm_stretch_leaders_hrule_tl { leaders+hrule }
 
 \tl_set:Nn \l_xephm_fnt_kayhan_tl       { kayhan }
 \tl_set:Nn \l_xephm_fnt_kayhannavaar_tl { kayhannavaar }
@@ -211,7 +217,7 @@
 
 \msg_new:nnn { xepersian-hm } { error-kashida-character-is-not-available-in-the-main-font }
   {
-    Sorry,~ kashida~ character~ is~ not~ available~ in~ the~ main~ font~!
+    Sorry,~ kashida~ character~ is~ not~ available~ in~ the~ main~ font~#1!
   }
 
 \msg_new:nnn { xepersian-hm } { error-value-not-available-for-kashida-option }
@@ -230,6 +236,16 @@
     and~ is~ not~ regarded~ as~ stable.
   }
 
+\msg_new:nnn { xepersian-hm } { hm-series-font-not-found }
+  {
+    Either~ the~ font~`#1'~ is~ not~ installed~ on~ your~ system~ or~ does~ not~
+    belong~ to~ HM~Series~fonts.~
+    Please~ note~ that~ the~ option~ `Kashida=leaders+glyph'~ is~ currently~ only~
+    supported~ by~ HM~Series~fonts.~
+    If~ you~ know~ of~ any~ other~ font~ that~ supports~ this~ option,~ please~
+    let~ me~ know~ to~ add~ it~ to~ the~ list~ of~ corresponding~ fonts.~
+  }
+
 \keys_define:nn { xepersian-hm }
   {
     Kashida .code:n =
@@ -239,7 +255,8 @@
           {
             \l_xephm_stretch_glyph_tl
               {
-                \tl_set:Nn \l_xephm_gap_filler_tl { \l_xephm_stretch_glyph_tl }
+                \msg_warning:nnn { xepersian-hm } { warning-experimental-feature } { Kashida=glyph }
+                \tl_set:Nx \l_xephm_gap_filler_tl { \l_xephm_stretch_glyph_tl }
                 \AtBeginDocument
                   {
                     \tl_set:Nx \l_xephm_main_font_full_tl { \tex_fontname:D \tex_the:D \tex_font:D }
@@ -248,14 +265,18 @@
                     \int_set:Nn \l_xephm_kashida_slot_int { \xetex_charglyph:D \c_xephm_ksh_int }
                     \int_compare:nT { \l_xephm_kashida_slot_int = \c_zero_int }
                       {
-                        \msg_error:nn { xepersian-hm } { error-kashida-character-is-not-available-in-the-main-font }
+                        \msg_error:nnx { xepersian-hm } { error-kashida-character-is-not-available-in-the-main-font } { \l_xephm_main_font_name_tl }
                       }
                   }
               }
-            \l_xephm_stretch_hrule_tl
+            \l_xephm_stretch_leaders_glyph_tl
               {
-                \tl_set:Nn \l_xephm_gap_filler_tl { \l_xephm_stretch_hrule_tl }
+                \tl_set:Nx \l_xephm_gap_filler_tl { \l_xephm_stretch_leaders_glyph_tl }
               }
+            \l_xephm_stretch_leaders_hrule_tl
+              {
+                \tl_set:Nx \l_xephm_gap_filler_tl { \l_xephm_stretch_leaders_hrule_tl }
+              }
           } { } { \tl_set:Nx \l_xephm_gap_filler_tl { #1 } }
         \tl_if_empty:NT \l_xephm_gap_filler_tl { \msg_error:nn { xepersian-hm } { error-specify-value-for-kashida-option } }
         \bool_set_true:N \l_xephm_kashida_hm_fix_bool
@@ -351,7 +372,7 @@
 %    \begin{macrocode}
 %<*kashida-xepersian-hm-def>
 \ExplSyntaxOn
-\ProvidesExplFile {kashida-xepersian-hm.def} {2020-05-20} {0.5f} { Fixes~implementation~of~Kashida~in~xepersian~package }
+\ProvidesExplFile {kashida-xepersian-hm.def} {2020-05-31} {1.0a} { Fixes~implementation~of~Kashida~in~xepersian~package }
 
 \newXeTeXintercharclass \c_xephm_d_charclass % dual-joiner class
 \newXeTeXintercharclass \c_xephm_l_charclass % lam
@@ -473,24 +494,45 @@
   }
 }
 
-%% Partly adapted from the code provided by Jonathan Kew in:
-%% https://tug.org/pipermail/xetex/2009-February/012307.html.
-%% Somebody notified me that the code in 'kashida-xepersian.def' from xepersian
-%% package is an exact copy of Jonathan Kew's code. Being unaware of this, in
-%% the earlier versions of this package I made a mistake and acknowledged
-%% Vafa Khalighi instead of Jonathan Kew. A sincere thank you to Jonathan Kew
-%% for his excellent code.
-\cs_new:Npn \xephm_kashida_hrule #1
-  {
-    \bool_if:NT \l_xephm_kashida_hm_fix_bool
+\cs_new:Npn \xephm_kashida_leaders #1
+{
+  \bool_if:NT \l_xephm_kashida_hm_fix_bool
     {
-      \c_xephm_lrm_int\c_xephm_zwj_int\tex_penalty:D 10000
-      \tex_leaders:D \tex_hrule:D height \XeTeXglyphbounds \c_xephm_two_int
-      \int_use:N \XeTeXcharglyph \c_xephm_ksh_int depth \XeTeXglyphbounds \c_xephm_four_int
-      \int_use:N \XeTeXcharglyph \c_xephm_ksh_int \skip_horizontal:n { #1 }
-      \c_xephm_zwj_int
+      \tl_if_eq:NNTF \l_xephm_gap_filler_tl  \l_xephm_stretch_leaders_glyph_tl 
+        {
+          \tl_set:Nx \l_xephm_font_full_tl { \tex_fontname:D \tex_the:D \tex_font:D }
+          \tl_set:Nx \l_xephm_font_name_tl { \l_xephm_font_full_tl }
+          \tl_set:Nx \l_xephm_font_init_tl { \l_xephm_font_name_tl }
+          \regex_replace_once:nnN { ^"\[?(HM)[\_\ ](X|F).* } { \1\2 } \l_xephm_font_init_tl\relax
+          \tl_set:Nn \l_tmpa_tl { HMF }
+          \tl_set:Nn \l_tmpb_tl { HMX }
+          \bool_if:nTF { \str_if_eq_p:NN { \l_xephm_font_init_tl } { \l_tmpa_tl } || \str_if_eq_p:NN { \l_xephm_font_init_tl } { \l_tmpb_tl } }
+            {
+              \hbox_set:Nn \l_xephm_ksh_box { \XeTeXglyph\XeTeXglyphindex"kashida" }
+              \c_xephm_zwj_int \tex_penalty:D 10000
+              \tex_leaders:D \copy\l_xephm_ksh_box \skip_horizontal:n { #1 }
+              \c_xephm_zwj_int
+            }
+            {
+              \msg_error:nnx { xepersian-hm } { hm-series-font-not-found } { \l_xephm_font_name_tl }
+            }
+        }
+        {
+          %% Partly adapted from the code provided by Jonathan Kew in:
+          %% https://tug.org/pipermail/xetex/2009-February/012307.html.
+          %% Somebody notified me that the code in 'kashida-xepersian.def' from xepersian
+          %% package is an exact copy of Jonathan Kew's code. Being unaware of this, in
+          %% the earlier versions of this package I made a mistake and acknowledged
+          %% Vafa Khalighi instead of Jonathan Kew. A sincere thank you to Jonathan Kew
+          %% for his excellent code.
+          \c_xephm_lrm_int\c_xephm_zwj_int\tex_penalty:D 10000
+          \tex_leaders:D \tex_hrule:D height \XeTeXglyphbounds \c_xephm_two_int
+          \int_use:N \XeTeXcharglyph \c_xephm_ksh_int depth \XeTeXglyphbounds \c_xephm_four_int
+          \int_use:N \XeTeXcharglyph \c_xephm_ksh_int \skip_horizontal:n { #1 }
+          \c_xephm_zwj_int
+        }
     }
-  }
+}
 
 \XeTeXinterchartokenstate = 1
 
@@ -524,81 +566,57 @@
     \XeTeXcharclass "#1 \c_xephm_y_charclass
   }
 
-\str_case:VnTF \l_xephm_gap_filler_tl
-  {
-    \l_xephm_stretch_glyph_tl
-      {
-        \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_y_charclass =
-          {
-            \bool_if:NTF \l_xephm_kashida_hm_fix_bool
-            { \c_xephm_zwj_int \xephm_kashida_glyph \l_xephm_skip_default_tl \c_xephm_zwj_int }
-            { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-          }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_y_charclass =
-          {
-            \bool_if:NTF \l_xephm_kashida_hm_fix_bool
-            { \c_xephm_zwj_int \xephm_kashida_glyph \l_xephm_skip_default_tl \c_xephm_zwj_int }
-            { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-          }
-        \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_d_charclass =
-          { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_d_charclass =
-          { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-        \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_d_charclass =
-          { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_l_charclass =
-          { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-        \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_l_charclass =
-          { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_r_charclass =
-          { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_a_charclass =
-          { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-        \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_r_charclass =
-          { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-        \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_a_charclass =
-          { }
-      }
-    \l_xephm_stretch_hrule_tl
-      {
-        \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_y_charclass =
-          {
-            \bool_if:NTF \l_xephm_kashida_hm_fix_bool
-            { \xephm_kashida_hrule \l_xephm_skip_default_tl }
-            { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-          }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_y_charclass =
-          {
-            \bool_if:NTF \l_xephm_kashida_hm_fix_bool
-            { \xephm_kashida_hrule \l_xephm_skip_default_tl }
-            { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-          }
-        \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_d_charclass =
-          { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_d_charclass =
-          { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-        \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_d_charclass =
-          { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_l_charclass =
-          { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-        \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_l_charclass =
-          { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_r_charclass =
-          { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_a_charclass =
-          { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-        \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_r_charclass =
-          { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-        \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_a_charclass =
-          { }
-      }
+\tl_if_eq:NNTF  \l_xephm_gap_filler_tl  \l_xephm_stretch_glyph_tl {
+  \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_y_charclass = {
+    \bool_if:NTF \l_xephm_kashida_hm_fix_bool
+    { \c_xephm_zwj_int \xephm_kashida_glyph \l_xephm_skip_default_tl \c_xephm_zwj_int }
+    { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
   }
+  \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_y_charclass = {
+    \bool_if:NTF \l_xephm_kashida_hm_fix_bool
+    { \c_xephm_zwj_int \xephm_kashida_glyph \l_xephm_skip_default_tl \c_xephm_zwj_int }
+    { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  }
+  \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_d_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_d_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_d_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_l_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_l_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_r_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_a_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_r_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_a_charclass = { }
+}
+{
+  \bool_if:nTF {
+    \tl_if_eq_p:NN  \l_xephm_gap_filler_tl  \l_xephm_stretch_leaders_glyph_tl ||
+    \tl_if_eq_p:NN  \l_xephm_gap_filler_tl  \l_xephm_stretch_leaders_hrule_tl
+  }
   {
-    \msg_warning:nnn { xepersian-hm } { warning-experimental-feature } { Kashida=glyph }
+    \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_y_charclass = {
+      \bool_if:NTF \l_xephm_kashida_hm_fix_bool
+      { \xephm_kashida_leaders \l_xephm_skip_default_tl }
+      { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    }
+    \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_y_charclass = {
+      \bool_if:NTF \l_xephm_kashida_hm_fix_bool
+      { \xephm_kashida_leaders \l_xephm_skip_default_tl }
+      { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    }
+    \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_d_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_d_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_d_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_l_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_l_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_r_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_a_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_r_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_a_charclass = { }
   }
   {
     \msg_error:nnx { xepersian-hm } { error-value-not-available-for-kashida-option } { \l_xephm_gap_filler_tl }
   }
+}
 
 \NewDocumentCommand \KashidaHMFixOn {} { \bool_set_true:N \l_xephm_kashida_hm_fix_bool }
 \NewDocumentCommand \KashidaHMFixOff {} { \bool_set_false:N \l_xephm_kashida_hm_fix_bool }

Modified: trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/kashida-xepersian-hm.def
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/kashida-xepersian-hm.def	2020-05-31 21:12:05 UTC (rev 55364)
+++ trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/kashida-xepersian-hm.def	2020-05-31 21:12:25 UTC (rev 55365)
@@ -13,7 +13,7 @@
 %% this license is at: http://www.latex-project.org/lppl.txt
 %% 
 \ExplSyntaxOn
-\ProvidesExplFile {kashida-xepersian-hm.def} {2020-05-20} {0.5f} { Fixes~implementation~of~Kashida~in~xepersian~package }
+\ProvidesExplFile {kashida-xepersian-hm.def} {2020-05-31} {1.0a} { Fixes~implementation~of~Kashida~in~xepersian~package }
 
 \newXeTeXintercharclass \c_xephm_d_charclass % dual-joiner class
 \newXeTeXintercharclass \c_xephm_l_charclass % lam
@@ -135,24 +135,45 @@
   }
 }
 
-%% Partly adapted from the code provided by Jonathan Kew in:
-%% https://tug.org/pipermail/xetex/2009-February/012307.html.
-%% Somebody notified me that the code in 'kashida-xepersian.def' from xepersian
-%% package is an exact copy of Jonathan Kew's code. Being unaware of this, in
-%% the earlier versions of this package I made a mistake and acknowledged
-%% Vafa Khalighi instead of Jonathan Kew. A sincere thank you to Jonathan Kew
-%% for his excellent code.
-\cs_new:Npn \xephm_kashida_hrule #1
-  {
-    \bool_if:NT \l_xephm_kashida_hm_fix_bool
+\cs_new:Npn \xephm_kashida_leaders #1
+{
+  \bool_if:NT \l_xephm_kashida_hm_fix_bool
     {
-      \c_xephm_lrm_int\c_xephm_zwj_int\tex_penalty:D 10000
-      \tex_leaders:D \tex_hrule:D height \XeTeXglyphbounds \c_xephm_two_int
-      \int_use:N \XeTeXcharglyph \c_xephm_ksh_int depth \XeTeXglyphbounds \c_xephm_four_int
-      \int_use:N \XeTeXcharglyph \c_xephm_ksh_int \skip_horizontal:n { #1 }
-      \c_xephm_zwj_int
+      \tl_if_eq:NNTF \l_xephm_gap_filler_tl  \l_xephm_stretch_leaders_glyph_tl
+        {
+          \tl_set:Nx \l_xephm_font_full_tl { \tex_fontname:D \tex_the:D \tex_font:D }
+          \tl_set:Nx \l_xephm_font_name_tl { \l_xephm_font_full_tl }
+          \tl_set:Nx \l_xephm_font_init_tl { \l_xephm_font_name_tl }
+          \regex_replace_once:nnN { ^"\[?(HM)[\_\ ](X|F).* } { \1\2 } \l_xephm_font_init_tl\relax
+          \tl_set:Nn \l_tmpa_tl { HMF }
+          \tl_set:Nn \l_tmpb_tl { HMX }
+          \bool_if:nTF { \str_if_eq_p:NN { \l_xephm_font_init_tl } { \l_tmpa_tl } || \str_if_eq_p:NN { \l_xephm_font_init_tl } { \l_tmpb_tl } }
+            {
+              \hbox_set:Nn \l_xephm_ksh_box { \XeTeXglyph\XeTeXglyphindex"kashida" }
+              \c_xephm_zwj_int \tex_penalty:D 10000
+              \tex_leaders:D \copy\l_xephm_ksh_box \skip_horizontal:n { #1 }
+              \c_xephm_zwj_int
+            }
+            {
+              \msg_error:nnx { xepersian-hm } { hm-series-font-not-found } { \l_xephm_font_name_tl }
+            }
+        }
+        {
+          %% Partly adapted from the code provided by Jonathan Kew in:
+          %% https://tug.org/pipermail/xetex/2009-February/012307.html.
+          %% Somebody notified me that the code in 'kashida-xepersian.def' from xepersian
+          %% package is an exact copy of Jonathan Kew's code. Being unaware of this, in
+          %% the earlier versions of this package I made a mistake and acknowledged
+          %% Vafa Khalighi instead of Jonathan Kew. A sincere thank you to Jonathan Kew
+          %% for his excellent code.
+          \c_xephm_lrm_int\c_xephm_zwj_int\tex_penalty:D 10000
+          \tex_leaders:D \tex_hrule:D height \XeTeXglyphbounds \c_xephm_two_int
+          \int_use:N \XeTeXcharglyph \c_xephm_ksh_int depth \XeTeXglyphbounds \c_xephm_four_int
+          \int_use:N \XeTeXcharglyph \c_xephm_ksh_int \skip_horizontal:n { #1 }
+          \c_xephm_zwj_int
+        }
     }
-  }
+}
 
 \XeTeXinterchartokenstate = 1
 
@@ -186,81 +207,57 @@
     \XeTeXcharclass "#1 \c_xephm_y_charclass
   }
 
-\str_case:VnTF \l_xephm_gap_filler_tl
-  {
-    \l_xephm_stretch_glyph_tl
-      {
-        \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_y_charclass =
-          {
-            \bool_if:NTF \l_xephm_kashida_hm_fix_bool
-            { \c_xephm_zwj_int \xephm_kashida_glyph \l_xephm_skip_default_tl \c_xephm_zwj_int }
-            { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-          }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_y_charclass =
-          {
-            \bool_if:NTF \l_xephm_kashida_hm_fix_bool
-            { \c_xephm_zwj_int \xephm_kashida_glyph \l_xephm_skip_default_tl \c_xephm_zwj_int }
-            { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-          }
-        \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_d_charclass =
-          { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_d_charclass =
-          { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-        \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_d_charclass =
-          { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_l_charclass =
-          { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-        \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_l_charclass =
-          { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_r_charclass =
-          { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_a_charclass =
-          { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-        \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_r_charclass =
-          { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
-        \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_a_charclass =
-          { }
-      }
-    \l_xephm_stretch_hrule_tl
-      {
-        \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_y_charclass =
-          {
-            \bool_if:NTF \l_xephm_kashida_hm_fix_bool
-            { \xephm_kashida_hrule \l_xephm_skip_default_tl }
-            { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-          }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_y_charclass =
-          {
-            \bool_if:NTF \l_xephm_kashida_hm_fix_bool
-            { \xephm_kashida_hrule \l_xephm_skip_default_tl }
-            { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-          }
-        \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_d_charclass =
-          { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_d_charclass =
-          { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-        \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_d_charclass =
-          { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_l_charclass =
-          { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-        \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_l_charclass =
-          { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_r_charclass =
-          { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-        \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_a_charclass =
-          { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-        \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_r_charclass =
-          { \xephm_kashida_hrule \c_xephm_skip_a_tl }
-        \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_a_charclass =
-          { }
-      }
+\tl_if_eq:NNTF  \l_xephm_gap_filler_tl  \l_xephm_stretch_glyph_tl {
+  \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_y_charclass = {
+    \bool_if:NTF \l_xephm_kashida_hm_fix_bool
+    { \c_xephm_zwj_int \xephm_kashida_glyph \l_xephm_skip_default_tl \c_xephm_zwj_int }
+    { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
   }
+  \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_y_charclass = {
+    \bool_if:NTF \l_xephm_kashida_hm_fix_bool
+    { \c_xephm_zwj_int \xephm_kashida_glyph \l_xephm_skip_default_tl \c_xephm_zwj_int }
+    { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  }
+  \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_d_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_d_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_d_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_l_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_l_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_r_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_a_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_r_charclass = { \c_xephm_zwj_int \xephm_kashida_glyph \c_xephm_skip_a_tl \c_xephm_zwj_int }
+  \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_a_charclass = { }
+}
+{
+  \bool_if:nTF {
+    \tl_if_eq_p:NN  \l_xephm_gap_filler_tl  \l_xephm_stretch_leaders_glyph_tl ||
+    \tl_if_eq_p:NN  \l_xephm_gap_filler_tl  \l_xephm_stretch_leaders_hrule_tl
+  }
   {
-    \msg_warning:nnn { xepersian-hm } { warning-experimental-feature } { Kashida=glyph }
+    \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_y_charclass = {
+      \bool_if:NTF \l_xephm_kashida_hm_fix_bool
+      { \xephm_kashida_leaders \l_xephm_skip_default_tl }
+      { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    }
+    \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_y_charclass = {
+      \bool_if:NTF \l_xephm_kashida_hm_fix_bool
+      { \xephm_kashida_leaders \l_xephm_skip_default_tl }
+      { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    }
+    \XeTeXinterchartoks \c_xephm_y_charclass \c_xephm_d_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_d_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_d_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_l_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_l_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_r_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    \XeTeXinterchartoks \c_xephm_d_charclass \c_xephm_a_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_r_charclass = { \xephm_kashida_leaders \c_xephm_skip_a_tl }
+    \XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_a_charclass = { }
   }
   {
     \msg_error:nnx { xepersian-hm } { error-value-not-available-for-kashida-option } { \l_xephm_gap_filler_tl }
   }
+}
 
 \NewDocumentCommand \KashidaHMFixOn {} { \bool_set_true:N \l_xephm_kashida_hm_fix_bool }
 \NewDocumentCommand \KashidaHMFixOff {} { \bool_set_false:N \l_xephm_kashida_hm_fix_bool }

Modified: trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm.sty
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm.sty	2020-05-31 21:12:05 UTC (rev 55364)
+++ trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/xepersian-hm.sty	2020-05-31 21:12:25 UTC (rev 55365)
@@ -31,8 +31,10 @@
 \RequirePackage{zref-savepos}[2020-03-03]
 \RequirePackage{xepersian}
 \ExplSyntaxOn
-\ProvidesExplPackage {xepersian-hm} {2020-05-20} {0.5f} { Fixes~issues~in~xepersian~package }
+\ProvidesExplPackage {xepersian-hm} {2020-05-31} {1.0a} { Fixes~issues~in~xepersian~package }
 
+\box_new:N \l_xephm_ksh_box
+
 \int_const:Nn \c_xephm_ksh_int {"0640} % kashida
 \int_const:Nn \c_xephm_lrm_int {"200E} % left-right-mark
 \int_const:Nn \c_xephm_zwj_int {"200D} % zero-width joiner
@@ -60,6 +62,9 @@
 \tl_new:N \l_xephm_main_font_full_tl
 \tl_new:N \l_xephm_main_font_name_tl
 
+\tl_new:N \l_xephm_font_full_tl
+\tl_new:N \l_xephm_font_name_tl
+
 \tl_new:N \l_xephm_skip_default_tl
 
 \tl_new:N \l_xephm_active_ligs_tl
@@ -79,7 +84,8 @@
 \int_set:Nn \l_xephm_max_penalty_int { 10000 }
 
 \tl_set:Nn \l_xephm_stretch_glyph_tl { glyph }
-\tl_set:Nn \l_xephm_stretch_hrule_tl { hrule }
+\tl_set:Nn \l_xephm_stretch_leaders_glyph_tl { leaders+glyph }
+\tl_set:Nn \l_xephm_stretch_leaders_hrule_tl { leaders+hrule }
 
 \tl_set:Nn \l_xephm_fnt_kayhan_tl       { kayhan }
 \tl_set:Nn \l_xephm_fnt_kayhannavaar_tl { kayhannavaar }
@@ -146,7 +152,7 @@
 
 \msg_new:nnn { xepersian-hm } { error-kashida-character-is-not-available-in-the-main-font }
   {
-    Sorry,~ kashida~ character~ is~ not~ available~ in~ the~ main~ font~!
+    Sorry,~ kashida~ character~ is~ not~ available~ in~ the~ main~ font~#1!
   }
 
 \msg_new:nnn { xepersian-hm } { error-value-not-available-for-kashida-option }
@@ -165,6 +171,16 @@
     and~ is~ not~ regarded~ as~ stable.
   }
 
+\msg_new:nnn { xepersian-hm } { hm-series-font-not-found }
+  {
+    Either~ the~ font~`#1'~ is~ not~ installed~ on~ your~ system~ or~ does~ not~
+    belong~ to~ HM~Series~fonts.~
+    Please~ note~ that~ the~ option~ `Kashida=leaders+glyph'~ is~ currently~ only~
+    supported~ by~ HM~Series~fonts.~
+    If~ you~ know~ of~ any~ other~ font~ that~ supports~ this~ option,~ please~
+    let~ me~ know~ to~ add~ it~ to~ the~ list~ of~ corresponding~ fonts.~
+  }
+
 \keys_define:nn { xepersian-hm }
   {
     Kashida .code:n =
@@ -174,7 +190,8 @@
           {
             \l_xephm_stretch_glyph_tl
               {
-                \tl_set:Nn \l_xephm_gap_filler_tl { \l_xephm_stretch_glyph_tl }
+                \msg_warning:nnn { xepersian-hm } { warning-experimental-feature } { Kashida=glyph }
+                \tl_set:Nx \l_xephm_gap_filler_tl { \l_xephm_stretch_glyph_tl }
                 \AtBeginDocument
                   {
                     \tl_set:Nx \l_xephm_main_font_full_tl { \tex_fontname:D \tex_the:D \tex_font:D }
@@ -183,14 +200,18 @@
                     \int_set:Nn \l_xephm_kashida_slot_int { \xetex_charglyph:D \c_xephm_ksh_int }
                     \int_compare:nT { \l_xephm_kashida_slot_int = \c_zero_int }
                       {
-                        \msg_error:nn { xepersian-hm } { error-kashida-character-is-not-available-in-the-main-font }
+                        \msg_error:nnx { xepersian-hm } { error-kashida-character-is-not-available-in-the-main-font } { \l_xephm_main_font_name_tl }
                       }
                   }
               }
-            \l_xephm_stretch_hrule_tl
+            \l_xephm_stretch_leaders_glyph_tl
               {
-                \tl_set:Nn \l_xephm_gap_filler_tl { \l_xephm_stretch_hrule_tl }
+                \tl_set:Nx \l_xephm_gap_filler_tl { \l_xephm_stretch_leaders_glyph_tl }
               }
+            \l_xephm_stretch_leaders_hrule_tl
+              {
+                \tl_set:Nx \l_xephm_gap_filler_tl { \l_xephm_stretch_leaders_hrule_tl }
+              }
           } { } { \tl_set:Nx \l_xephm_gap_filler_tl { #1 } }
         \tl_if_empty:NT \l_xephm_gap_filler_tl { \msg_error:nn { xepersian-hm } { error-specify-value-for-kashida-option } }
         \bool_set_true:N \l_xephm_kashida_hm_fix_bool



More information about the tex-live-commits mailing list.