texlive[57539] Master/texmf-dist: texnegar (27jan21)

commits+karl at tug.org commits+karl at tug.org
Wed Jan 27 23:06:08 CET 2021


Revision: 57539
          http://tug.org/svn/texlive?view=revision&revision=57539
Author:   karl
Date:     2021-01-27 23:06:08 +0100 (Wed, 27 Jan 2021)
Log Message:
-----------
texnegar (27jan21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/texnegar/INSTALL.txt
    trunk/Master/texmf-dist/doc/latex/texnegar/doc-ligature-texnegar.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/doc-ligature-xep.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/doc-samples-glyph.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/doc-samples-hrule.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/doc-samples-xep.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-doc.ltx
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-doc.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-glyph.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-glyph.tex
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-glyph.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-glyph.tex
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-hrule.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-hrule.tex
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-glyph.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-glyph.tex
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.tex
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.tex
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-glyph.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-glyph.tex
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.tex
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.tex
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/xepersian-XB.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/xepersian-XB.tex
    trunk/Master/texmf-dist/source/latex/texnegar/texnegar.dtx
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-char-table.lua
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-common-kashida.tex
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.lua
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.tex
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex-kashida.lua
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex.sty
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex-kashida.tex
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex.sty
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar.lua
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar.sty

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/INSTALL.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/texnegar/INSTALL.txt	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/doc/latex/texnegar/INSTALL.txt	2021-01-27 22:06:08 UTC (rev 57539)
@@ -1,11 +1,11 @@
   texnegar -- INSTALL
 ======================
 
-    Source:  texnegar.dtx (2020-08-30 v0.1b)
+    Source:  texnegar.dtx (2021-01-27 v0.1c)
     Author:  Hossein Movahhedian
     Info:    filecontents + macro + verbatim
     License: LPPL 1.3c
-    Copyright (C) 2020 Hossein Movahedian.
+    Copyright (C) 2020-2021 Hossein Movahedian.
     <dma8hm1334 AT gmail DOT com>
 
 -   To extract the package and at the same time produce the

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/doc-ligature-texnegar.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/doc-ligature-xep.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/doc-samples-glyph.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/doc-samples-hrule.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/doc-samples-xep.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-doc.ltx
===================================================================
--- trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-doc.ltx	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-doc.ltx	2021-01-27 22:06:08 UTC (rev 57539)
@@ -1,7 +1,7 @@
 %%
 %% This is file `texnegar-doc.tex'
 %%
-%%   Copyright (c) Hossein Movahhedian 2020
+%%   Copyright (c) Hossein Movahhedian 2020-2021
 %%
 %%   It may be distributed and/or modified under the LaTeX Project Public License,
 %%   version 1.3c or higher (your choice). The latest version of
@@ -17,6 +17,7 @@
 \usepackage{hologo}
 \usepackage{xcolor}
 \usepackage{iftex}
+\usepackage{enumitem}
 
 \setfontfamily\PeFont[Script=Arabic,Language=Persian]{HM XKayhan}
 
@@ -31,15 +32,15 @@
 % This also makes the index 1 columns, which I don't want
 \makeatletter
 \renewenvironment{theindex}
-               {\section*{\indexname}\begin{multicols}{2}%
-                \@mkboth{\MakeUppercase\indexname}%
-                        {\MakeUppercase\indexname}%
-                \thispagestyle{plain}\parindent\z@
-                \parskip\z@ \@plus .3\p@\relax
-                \columnseprule \z@
-                \columnsep 35\p@
-                \let\item\@idxitem}
-               {\end{multicols}}
+  {\section*{\indexname}\begin{multicols}{2}%
+   \@mkboth{\MakeUppercase\indexname}%
+           {\MakeUppercase\indexname}%
+   \thispagestyle{plain}\parindent\z@
+   \parskip\z@ \@plus .3\p@\relax
+   \columnseprule \z@
+   \columnsep 35\p@
+   \let\item\@idxitem}
+  {\end{multicols}}
 \makeatother
 
 \ifluatex
@@ -50,7 +51,7 @@
 \fi
 
 \title{
-  The \TeXNegar{} package\\Kashida justification in LuaTeX and XeTeX\\User Documentation
+  The \textsf{texnegar} package\\Kashida justification in LuaTeX and XeTeX\\User Documentation
 }
 
 \author{
@@ -62,7 +63,7 @@
    }
 }
 
-\date{Released \quad 2020-08-30 \quad v0.1b}
+\date{Released \quad 2021-01-27 \quad v0.1c}
 
 \definecolor{HMhighlightBlueI}{rgb}{0,0,1}
 \definecolor{HMhighlightbgYellowII}{rgb}{1,1,1}
@@ -103,15 +104,6 @@
   }
 \end{minipage}
 
-% \vskip 15mm
-% \begin{center}\begin{minipage}{0.65\linewidth}\parskip 15pt
-%   \textit{
-%  Negar, in Persian, is the present stem of negaashtan meaning to design; to paint;
-%  to write; and as a noun it means ``sweetheart, idol, beloved, figuratively refering
-%  to a beautiful woman, pattern, painting, and artistic design''
-%   }
-% \end{minipage}\end{center}
-
 \newpage
 
 \tableofcontents
@@ -136,30 +128,30 @@
 The \indexterm{texnegar}{\TeXNegar} package implements kashida justification in LuaTeX and XeTeX
 and fixes known bugs in \textsf{xepersian}.
 
-The following files in the directory \texttt{texmf-dist/doc/xelatex/texnegar/} can be used as simple
+The following files in the directory \texttt{texmf-dist/doc/latex/texnegar/} 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{texnegar-luatex-glyph.tex} \\
-        See pages 26 -- 35 for PDF output.
+    See pages 26 -- 35 for PDF output.
   \item \texttt{texnegar-luatex-leaders-glyph.tex} \\
-        See pages 36 -- 45 for PDF output.
+    See pages 36 -- 45 for PDF output.
   \item \texttt{texnegar-luatex-leaders-hrule.tex} \\
-        See pages 46 -- 55 for PDF output.
+    See pages 46 -- 55 for PDF output.
   \item \texttt{texnegar-xetex-bidi-glyph.tex} \\
-        See pages 56 -- 65 for PDF output.
+    See pages 56 -- 65 for PDF output.
   \item \texttt{texnegar-xetex-bidi-leaders-glyph.tex} \\
-        See pages 66 -- 75 for PDF output.
+    See pages 66 -- 75 for PDF output.
   \item \texttt{texnegar-xetex-bidi-leaders-hrule.tex} \\
-        See pages 76 -- 85 for PDF output.
+    See pages 76 -- 85 for PDF output.
   \item \texttt{texnegar-xetex-xepersian-glyph.tex} \\
-        See pages 86 -- 95 for PDF output.
+    See pages 86 -- 95 for PDF output.
   \item \texttt{texnegar-xetex-xepersian-leaders-glyph.tex} \\
-        See pages 96 -- 105 for PDF output.
+    See pages 96 -- 105 for PDF output.
   \item \texttt{texnegar-xetex-xepersian-leaders-hrule.tex} \\
-        See pages 106 -- 115 for PDF output.
+    See pages 106 -- 115 for PDF output.
   % \item \texttt{xepersian-XB.tex} \\
-  %       See pages 14 -- 23 for PDF output.
+  %   See pages 16 -- 25 for PDF output.
 \end{list}
 
 Please use the Bitbucket issue tracker:
@@ -174,59 +166,59 @@
 
 Kashida is one of the most important features that must be included in any
 Persian typesetter. In \textsf{xepersian} this feature is implemented but with some
-problems. See pages 14 -- 23 for pictorial illustrations for various font styles.
+problems. See pages 16 -- 25 for pictorial illustrations for various font styles.
 These problems along with the fixes in \TeXNegar{} are briefly:
 
 \newcounter{bean}
   \begin{list}{P-\Roman{bean}}{\usecounter{bean}\setlength{\rightmargin}{\leftmargin}}
-  \item In \textsf{xepersian} \indexterm{overlapping of glyphs}{overlapping of glyphs} occurs in letter
-        combinations such as "{\RtoL{ﺑ + ﻰ}}", "{\RtoL{ﺗ + ﻰ}}", and
-        "{\RtoL{ﭘ + ﻰ}}" because the character
-        \textsf{U+FEF0 (ARABIC LETTER FARSI YEH FINAL FORM)} is replaced with
-        another character. This is fixed by modifying the fixed part of the
-        glue inserted between the consecutive characters. Furthermore, both,
-        the fixed and the stretchable parts of the glue can be changed by the
-        user.
-  \item In \indexterm{letter combinations}{letter combinations} such as "{\RtoL{ﻫ + ﻰ}}", in \textsf{xepersian},
-        the character \textsf{U+FEEB (ARABIC LETTER HEH INITIAL FORM)} is
-        replaced with \textsf{U+06BE (ARABIC LETTER HEH DOACHASHEMEE)}. This
-        is fixed by inserting the character \textsf{U+200E} before the
-        combination "\textsf{U+200D + hrule + U+200D}" which is used as
-        stretching item.
-
-        {\color{gray}
-        Note: \indexterm{Vafa Khalighi}{Vafa Khalighi} has fixed this problem in
-        \href{https://tug.org/svn/texlive/trunk/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def?revision=55165&view=co}%
-             {\texttt{xepersian-23.0}},
-        by copying the corresponding code from 
-        \href{http://www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/kashida-xepersian-hm.def?revision=55123&view=co}%
-             {\texttt{xepersian-hm-0.5e}}.
-        Consequently, the
-        option \texttt{KashidaXBFix} along with the commands \linebreak[4]
-        \texttt{\textbackslash KashidaXBFixOn} and
-        \texttt{\textbackslash KashidaXBFixOff} has been removed in \linebreak[4]
-        \texttt{xepersian-23.0} and the later versions.}
-        
-  \item In \textsf{xepersian} when outline or shadow fonts are used, the gaps
-        filled by horizontal rule appears as a solid box. This is fixed by
-        using the \textsf{kashida} glyph instead of the horizontal rule in
-        \TeXNegar.
-  \item Activating kashida in \textsf{xepersian} disturbs \indexterm{ligatures}{ligatures}. This is
-        fixed in \TeXNegar{} by escaping the components of the
-        ligature which form the glyph, i.e. by inserting an escape character
-        before Persian letters joined to form the ligature without any empty
-        characters, blank characters, invisible characters and whitespace
-        characters which form the glyph. See
-        \mbox{Figures \ref{fig:ligatures-xep} and \ref{fig:ligatures-texnegar}}.
-        Currently only 3 ligature glyphs are available in
-        \TeXNegar, but you can add as many as you want or let
-        me know the ligature glyphs that you need, so that I can add them in
-        the next release of the package. Of course, this is not the best
-        solution, but it works.
-
-  \item If italic or oblique style of some fonts, such as \textsf{X Series 2},
-        is used in \textsf{xepersian}, an extra \indexterm{gap}{gap} is left between the
-        stretched characters. This is fixed in \textsf{HM Series} fonts.
+    \item In \textsf{xepersian} \indexterm{overlapping of glyphs}{overlapping of glyphs} occurs in letter
+      combinations such as "{\RtoL{ﺑ + ﻰ}}", "{\RtoL{ﺗ + ﻰ}}", and
+      "{\RtoL{ﭘ + ﻰ}}" because the character
+      \textsf{U+FEF0 (ARABIC LETTER FARSI YEH FINAL FORM)} is replaced with
+      another character. This is fixed by modifying the fixed part of the
+      glue inserted between the consecutive characters. Furthermore, both,
+      the fixed and the stretchable parts of the glue can be changed by the
+      user.
+    \item In \indexterm{letter combinations}{letter combinations} such as "{\RtoL{ﻫ + ﻰ}}", in \textsf{xepersian},
+      the character \textsf{U+FEEB (ARABIC LETTER HEH INITIAL FORM)} is
+      replaced with \textsf{U+06BE (ARABIC LETTER HEH DOACHASHEMEE)}. This
+      is fixed by inserting the character \textsf{U+200E} before the
+      combination "\textsf{U+200D + hrule + U+200D}" which is used as
+      stretching item.
+  
+      {\color{gray}
+      Note: \indexterm{Vafa Khalighi}{Vafa Khalighi} has fixed this problem in
+      \href{https://tug.org/svn/texlive/trunk/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def?revision=55165&view=co}%
+           {\texttt{xepersian-23.0}},
+      by copying the corresponding code from 
+      \href{http://www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/xelatex/xepersian-hm/kashida-xepersian-hm.def?revision=55123&view=co}%
+           {\texttt{xepersian-hm-0.5e}}.
+      Consequently, the
+      option \texttt{KashidaXBFix} along with the commands \linebreak[4]
+      \texttt{\textbackslash KashidaXBFixOn} and
+      \texttt{\textbackslash KashidaXBFixOff} has been removed in \linebreak[4]
+      \texttt{xepersian-23.0} and the later versions.}
+          
+    \item In \textsf{xepersian} when outline or shadow fonts are used, the gaps
+      filled by horizontal rule appears as a solid box. This is fixed by
+      using the \textsf{kashida} glyph instead of the horizontal rule in
+      \TeXNegar.
+    \item Activating kashida in \textsf{xepersian} disturbs \indexterm{ligatures}{ligatures}. This is
+      fixed in \TeXNegar{} by escaping the components of the
+      ligature which form the glyph, i.e. by inserting an escape character
+      before Persian letters joined to form the ligature without any empty
+      characters, blank characters, invisible characters and whitespace
+      characters which form the glyph. See
+      \mbox{Figures \ref{fig:ligatures-xep} and \ref{fig:ligatures-texnegar}}.
+      Currently only 3 ligature glyphs are available in
+      \TeXNegar, but you can add as many as you want or let
+      me know the ligature glyphs that you need, so that I can add them in
+      the next release of the package. Of course, this is not the best
+      solution, but it works.
+  
+    \item If italic or oblique style of some fonts, such as \textsf{X Series 2},
+      is used in \textsf{xepersian}, an extra \indexterm{gap}{gap} is left between the
+      stretched characters. This is fixed in \textsf{HM Series} fonts.
 \end{list}
 
 For comparing the outputs of \textsf{xepersian} and \TeXNegar{} with
@@ -273,7 +265,7 @@
 For example:
 \begin{verbatim}
 \documentclass{report}
-\usepackage[Kashida=leaders+glyph]{texnegar}
+\usepackage[Minimal=On,Kashida=leaders+glyph]{texnegar}
 \usepackage{xepersian}
 \end{verbatim}
 
@@ -281,168 +273,179 @@
 
 \begin{itemize}
   \item \indexterm{General Options}{\textbf{General Options}}: \\
-\begin{itemize}
-  \item \indextermsub{General Options}{\textbf{General Options}}{\texttt{Kashida}}: \\
-    which implements kashida feature with three possible values:
     \begin{itemize}
-      \item \indextermsubsub{General Options}{\textbf{General Options}}{\texttt{Kashida}}{glyph}: \\
-        which uses the \texttt{kashida} character to stretch the text. \\
+      \item \indextermsub{General Options}{\textbf{General Options}}{\texttt{Minimal}}: \\
+        which has two possible values:
+        \begin{itemize}
+          \item \indextermsubsub{General Options}{\textbf{General Options}}{\texttt{Minimal}}{On}: \\
+            for using \texttt{texnegar} to implement kashida feature only.
+  
+          \item \indextermsubsub{General Options}{\textbf{General Options}}{\texttt{Minimal}}{Off}: \\
+            for using \texttt{texnegar} as a general purpose typesetter (including kashida implementation).
+            This is the default value.
+        \end{itemize}
 
-        {\color{magenta}
-        Imortant notes for \hologo{XeLaTeX} users: \\
-
+      \item \indextermsub{General Options}{\textbf{General Options}}{\texttt{Kashida}}: \\
+        which implements kashida feature with three possible values:
         \begin{itemize}
-          \item
-            If you are going to use this option then you should run \texttt{xelatex} thrice. For example: \\
-
-            \texttt{rm -f kashida-example.aux \\
-            xelatex kashida-example.tex \\
-            xelatex kashida-example.tex \\
-            xelatex kashida-example.tex} \\
-
-          \item
-            This feature is still experimental in \hologo{XeLaTeX} and is not regarded as stable,
-            so, if you are going to use this option be ready for unpredictable results.
-
-          \item
-            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.
-        \end{itemize}}
-
-      \item \indextermsubsub{General Options}{\textbf{General Options}}{\texttt{Kashida}}{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 \indextermsubsub{General Options}{\textbf{General Options}}{\texttt{Kashida}}{leaders+hrule}: \\
-        which uses horizontal rule (\verb|\hrule|) leaders to stretch the text.
-
-      \item \texttt{Off}: \\
-        which disables kashida feature.
-
-      \item \texttt{On}: \\
-        which is the same as \texttt{leaders+glyph}.
-
+          \item \indextermsubsub{General Options}{\textbf{General Options}}{\texttt{Kashida}}{glyph}: \\
+            which uses the \texttt{kashida} character to stretch the text. \\
+  
+            {\color{magenta}
+            Imortant notes for \hologo{XeLaTeX} users: \\
+  
+            \begin{itemize}
+              \item
+                If you are going to use this option then you should run \texttt{xelatex} thrice. For example: \\
+  
+                \texttt{rm -f kashida-example.aux \\
+                xelatex kashida-example.tex \\
+                xelatex kashida-example.tex \\
+                xelatex kashida-example.tex} \\
+  
+              \item
+                This feature is still experimental in \hologo{XeLaTeX} and is not regarded as stable,
+                so, if you are going to use this option be ready for unpredictable results.
+  
+              \item
+                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.
+            \end{itemize}}
+  
+          \item \indextermsubsub{General Options}{\textbf{General Options}}{\texttt{Kashida}}{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 \indextermsubsub{General Options}{\textbf{General Options}}{\texttt{Kashida}}{leaders+hrule}: \\
+            which uses horizontal rule (\verb|\hrule|) leaders to stretch the text.
+  
+          \item \texttt{Off}: \\
+            which disables kashida feature.
+  
+          \item \texttt{On}: \\
+            which is the same as \texttt{leaders+glyph}.
+  
+        \end{itemize}
+        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 \indextermsub{General Options}{\textbf{General Options}}{\texttt{linebreakpenalty}}: \\
+        which specifies the amount of penalty for preventing bad line-breaking.
+        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}
+          \texttt{min}:    & \texttt{0} \\
+          \texttt{low}:    & \texttt{8} \\
+          \texttt{medium}: & \texttt{15} \\
+          \texttt{high}:   & \texttt{25} \\
+          \texttt{max}:    & \texttt{10000}
+        \end{longtable}
+  
+      \item \indextermsub{General Options}{\textbf{General Options}}{\texttt{ligatures}}: \\
+        which fixes the disturbance of ligatures caused by activating kashida
+        justification in \TeXNegar. You may strictly specify the value of this option.
+        For example \texttt{'ligatures=dlig'} or you may use the default value.
+        The available values are:
+  
+        \begin{longtable}{ll}
+          \texttt{aalt}:    & Access All Alternatives \\
+          \texttt{ccmp}:    & Glyph Composition/Decomposition \\
+          \texttt{dlig}:    & Discretionary Ligatures \\
+          \texttt{fina}:    & Final (Terminal) Forms \\
+          \texttt{init}:    & Initial Forms \\
+          \texttt{locl}:    & Localized Forms \\
+          \texttt{medi}:    & Medial Forms \\
+          \texttt{rlig}:    & Required Ligatures \\
+          \texttt{default}: & All the above features
+        \end{longtable}
+        Please note that this feature is still experimental and is not regarded as stable.
+  
+      \item \indextermsub{General Options}{\textbf{General Options}}{\texttt{color}}: \\
+        which colorize the stretched parts of the text for checking the quality of kashida
+        justification. Color must be one of a named color declared in \textsf{xcolor} package.
+        For example: \texttt{color=blue} or \texttt{color=Blue}.
+  
+        Default color name is: \texttt{magenta}
+  
+        Please note that activating this option increases system resource and disk usage.
+  
     \end{itemize}
-    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 \indextermsub{General Options}{\textbf{General Options}}{\texttt{linebreakpenalty}}: \\
-    which specifies the amount of penalty for preventing bad line-breaking.
-    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}
-      \texttt{min}:    & \texttt{0} \\
-      \texttt{low}:    & \texttt{8} \\
-      \texttt{medium}: & \texttt{15} \\
-      \texttt{high}:   & \texttt{25} \\
-      \texttt{max}:    & \texttt{10000}
-    \end{longtable}
-
-  \item \indextermsub{General Options}{\textbf{General Options}}{\texttt{ligatures}}: \\
-    which fixes the disturbance of ligatures caused by activating kashida
-    justification in \TeXNegar. You may strictly specify the value of this option.
-    For example \texttt{'ligatures=dlig'} or you may use the default value.
-    The available values are:
-
-    \begin{longtable}{ll}
-      \texttt{aalt}:    & Access All Alternatives \\
-      \texttt{ccmp}:    & Glyph Composition/Decomposition \\
-      \texttt{dlig}:    & Discretionary Ligatures \\
-      \texttt{fina}:    & Final (Terminal) Forms \\
-      \texttt{init}:    & Initial Forms \\
-      \texttt{locl}:    & Localized Forms \\
-      \texttt{medi}:    & Medial Forms \\
-      \texttt{rlig}:    & Required Ligatures \\
-      \texttt{default}: & All the above features
-    \end{longtable}
-    Please note that this feature is still experimental and is not regarded as stable.
-
-  \item \indextermsub{General Options}{\textbf{General Options}}{\texttt{color}}: \\
-    which colorize the stretched parts of the text for checking the quality of kashida
-    justification. Color must be one of a named color declared in \textsf{xcolor} package.
-    For example: \texttt{color=blue} or \texttt{color=Blue}.
-
-    Default color name is: \texttt{magenta}
-
-    Please note that activating this option increases system resource and disk usage.
-
 \end{itemize}
-\end{itemize}
 
 \begin{itemize}
   \item \indexterm{LuaLaTeX-only Options}{\textbf{\hologo{LuaLaTeX}-only Options}}: \\
-\begin{itemize}
-  \item \indextermsub{LuaLaTeX-only Options}{\textbf{\hologo{LuaLaTeX}-only Options}}{\texttt{hboxrecursion}}: \\
-    which enables kashida justification inside horizontal boxes recursively.
+    \begin{itemize}
+      \item \indextermsub{LuaLaTeX-only Options}{\textbf{\hologo{LuaLaTeX}-only Options}}{\texttt{hboxrecursion}}: \\
+        which enables kashida justification inside horizontal boxes recursively.
 
-  \item \indextermsub{LuaLaTeX-only Options}{\textbf{\hologo{LuaLaTeX}-only Options}}{\texttt{vboxrecursion}}: \\
-    which enables kashida justification inside vertical boxes recursively.
+      \item \indextermsub{LuaLaTeX-only Options}{\textbf{\hologo{LuaLaTeX}-only Options}}{\texttt{vboxrecursion}}: \\
+        which enables kashida justification inside vertical boxes recursively.
 
+    \end{itemize}
 \end{itemize}
-\end{itemize}
 
 \begin{itemize}
   \item \indexterm{XeLaTeX-only Options}{\textbf{\hologo{XeLaTeX}-only Options}}: \\
-\begin{itemize}
-  \item \indextermsub{XeLaTeX-only Options}{\textbf{\hologo{XeLaTeX}-only Options}}{\texttt{kashidastretch}}: \\
-    which specifies the amount of extra stretching
-    for some combinations of characters. You may strictly specify the value of
-    this option. For example \texttt{'kashidastretch=0.14 em plus 0.5 em'} or you
-    may use the default values. The available default values are:
+    \begin{itemize}
+      \item \indextermsub{XeLaTeX-only Options}{\textbf{\hologo{XeLaTeX}-only Options}}{\texttt{kashidastretch}}: \\
+        which specifies the amount of extra stretching
+        for some combinations of characters. You may strictly specify the value of
+        this option. For example \texttt{'kashidastretch=0.14 em plus 0.5 em'} or you
+        may use the default values. The available default values are:
+    
+        \begin{longtable}{lll}
+          \texttt{kayhan}       & \texttt{0.14  em plus 0.5 em} \\
+          \texttt{khorramshahr} & \texttt{0.131 em plus 0.5 em} \\
+          \texttt{kayhannavaar} & \texttt{0.129 em plus 0.5 em} \\
+          \texttt{kayhanpook}   & \texttt{0.133 em plus 0.5 em} \\
+          \texttt{kayhansayeh}  & \texttt{0.135 em plus 0.5 em} \\
+          \texttt{khoramshahr}  & \texttt{0.128 em plus 0.5 em} \\
+          \texttt{khorramshahr} & \texttt{0.13  em plus 0.5 em} \\
+          \texttt{niloofar}     & \texttt{0.132 em plus 0.5 em} \\
+          \texttt{paatch}       & \texttt{0.127 em plus 0.5 em} \\
+          \texttt{riyaz}        & \texttt{0.125 em plus 0.5 em} \\
+          \texttt{roya}         & \texttt{0.142 em plus 0.5 em} \\
+          \texttt{shafigh}      & \texttt{0.143 em plus 0.5 em} \\
+          \texttt{shafighKurd}  & \texttt{0.126 em plus 0.5 em} \\
+          \texttt{shafighUzbek} & \texttt{0.123 em plus 0.5 em} \\
+          \texttt{shiraz}       & \texttt{0.122 em plus 0.5 em} \\
+          \texttt{sols}         & \texttt{0.124 em plus 0.5 em} \\
+          \texttt{tabriz}       & \texttt{0.119 em plus 0.5 em} \\
+          \texttt{titr}         & \texttt{0.12  em plus 0.5 em} \\
+          \texttt{titre}        & \texttt{0.121 em plus 0.5 em} \\
+          \texttt{traffic}      & \texttt{0.124 em plus 0.5 em} \\
+          \texttt{vahid}        & \texttt{0.134 em plus 0.5 em} \\
+          \texttt{vosta}        & \texttt{0.136 em plus 0.5 em} \\
+          \texttt{yaghut}       & \texttt{0.138 em plus 0.5 em} \\
+          \texttt{yagut}        & \texttt{0.137 em plus 0.5 em} \\
+          \texttt{yas}          & \texttt{0.126 em plus 0.5 em} \\
+          \texttt{yekan}        & \texttt{0.141 em plus 0.5 em} \\
+          \texttt{yermook}      & \texttt{0.139 em plus 0.5 em} \\
+          \texttt{zar}          & \texttt{0.116 em plus 0.5 em} \\
+          \texttt{ziba}         & \texttt{0.119 em plus 0.5 em} \\
+          \texttt{default}      & \texttt{0.14  em plus 0.5 em} \\
+          \texttt{noskip}       & \texttt{0     em plus 0.5 em}
+        \end{longtable}
+    
+        For example: \mbox{\texttt{'kashidastretch=titr'}} is equivalent to\linebreak
+        \mbox{\texttt{'kashidastretch=0.12  em plus 0.5 em'}}
 
-    \begin{longtable}{lll}
-      \texttt{kayhan}       & \texttt{0.14  em plus 0.5 em} \\
-      \texttt{khorramshahr} & \texttt{0.131 em plus 0.5 em} \\
-      \texttt{kayhannavaar} & \texttt{0.129 em plus 0.5 em} \\
-      \texttt{kayhanpook}   & \texttt{0.133 em plus 0.5 em} \\
-      \texttt{kayhansayeh}  & \texttt{0.135 em plus 0.5 em} \\
-      \texttt{khoramshahr}  & \texttt{0.128 em plus 0.5 em} \\
-      \texttt{khorramshahr} & \texttt{0.13  em plus 0.5 em} \\
-      \texttt{niloofar}     & \texttt{0.132 em plus 0.5 em} \\
-      \texttt{paatch}       & \texttt{0.127 em plus 0.5 em} \\
-      \texttt{riyaz}        & \texttt{0.125 em plus 0.5 em} \\
-      \texttt{roya}         & \texttt{0.142 em plus 0.5 em} \\
-      \texttt{shafigh}      & \texttt{0.143 em plus 0.5 em} \\
-      \texttt{shafighKurd}  & \texttt{0.126 em plus 0.5 em} \\
-      \texttt{shafighUzbek} & \texttt{0.123 em plus 0.5 em} \\
-      \texttt{shiraz}       & \texttt{0.122 em plus 0.5 em} \\
-      \texttt{sols}         & \texttt{0.124 em plus 0.5 em} \\
-      \texttt{tabriz}       & \texttt{0.119 em plus 0.5 em} \\
-      \texttt{titr}         & \texttt{0.12  em plus 0.5 em} \\
-      \texttt{titre}        & \texttt{0.121 em plus 0.5 em} \\
-      \texttt{traffic}      & \texttt{0.124 em plus 0.5 em} \\
-      \texttt{vahid}        & \texttt{0.134 em plus 0.5 em} \\
-      \texttt{vosta}        & \texttt{0.136 em plus 0.5 em} \\
-      \texttt{yaghut}       & \texttt{0.138 em plus 0.5 em} \\
-      \texttt{yagut}        & \texttt{0.137 em plus 0.5 em} \\
-      \texttt{yas}          & \texttt{0.126 em plus 0.5 em} \\
-      \texttt{yekan}        & \texttt{0.141 em plus 0.5 em} \\
-      \texttt{yermook}      & \texttt{0.139 em plus 0.5 em} \\
-      \texttt{zar}          & \texttt{0.116 em plus 0.5 em} \\
-      \texttt{ziba}         & \texttt{0.119 em plus 0.5 em} \\
-      \texttt{default}      & \texttt{0.14  em plus 0.5 em} \\
-      \texttt{noskip}       & \texttt{0     em plus 0.5 em}
-    \end{longtable}
-
-    For example: \mbox{\texttt{'kashidastretch=titr'}} is equivalent to\linebreak
-    \mbox{\texttt{'kashidastretch=0.12  em plus 0.5 em'}}
-
+    \end{itemize}
 \end{itemize}
-\end{itemize}
 
 \section{Commands}
 
@@ -485,21 +488,26 @@
 question-and-answer (Q\&A) websites to solve problems for which I am grateful.
 I also would like to thank the developer teams of TeX's friends especially LaTeX, LuaTeX and XeTeX teams.
 
-\def\HistoryItem#1#2{\subsection*{[#1]} \addcontentsline{toc}{subsection}{[#1]} \item #2}
-
 \section{Change History}
 
-\begin{itemize}
-  \let\tmpitemindent\itemindent
-  \addtolength{\itemindent}{\leftmargin}
-  \setlength{\parskip}{0pt}
-  \setlength{\itemsep}{0pt}
+\def\SubSecItem#1{\subsubsection*{\hskip 2em\large #1}\addcontentsline{toc}{subsection}{[#1]}}
+\newenvironment{Itemize}{\begin{itemize}[leftmargin=4em]}{\end{itemize}}
 
-  \HistoryItem{2020-08-29~v0.1a}{First standalone version.}
+\SubSecItem{2020-08-29~v0.1a}
+\begin{Itemize}
+  \item First standalone version.
+\end{Itemize}
 
-  \HistoryItem{2020-08-30~v0.1b}{Changed some file names.}
+\SubSecItem{2020-08-30~v0.1b}
+\begin{Itemize}
+  \item Changed some file names.
+\end{Itemize}
 
-\end{itemize}
+\SubSecItem{2021-01-27~v0.1c}
+\begin{Itemize}
+  \item Added the option \texttt{Minimal} which is needed if texnegar is used for kashida implementaion only.
+  \item Fixed the problem with \texttt{Scheherazade} and \texttt{Amiri} fonts.
+\end{Itemize}
 
 \section*{To Do's}
 

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-glyph.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-glyph.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-glyph.tex	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-glyph.tex	2021-01-27 22:06:08 UTC (rev 57539)
@@ -34,7 +34,7 @@
 % \pagestyle{empty}
 \setcounter{page}{26}
 
-\usepackage[Kashida=glyph,kashidastretch=0.14 em plus 0.5 em,hboxrecursion=On,vboxrecursion=On,color=red]{texnegar}
+\usepackage[Minimal=On,Kashida=glyph,kashidastretch=0.14 em plus 0.5 em,hboxrecursion=On,vboxrecursion=On,color=red]{texnegar}
 
 \begin{document}
 

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-glyph.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-glyph.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-glyph.tex	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-glyph.tex	2021-01-27 22:06:08 UTC (rev 57539)
@@ -34,7 +34,7 @@
 % \pagestyle{empty}
 \setcounter{page}{36}
 
-\usepackage[Kashida=leaders+glyph,kashidastretch=0.14 em plus 0.5 em,hboxrecursion=On,vboxrecursion=On,color=red]{texnegar}
+\usepackage[Minimal=On,Kashida=leaders+glyph,kashidastretch=0.14 em plus 0.5 em,hboxrecursion=On,vboxrecursion=On,color=red]{texnegar}
 
 \begin{document}
 

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-hrule.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-hrule.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-hrule.tex	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-hrule.tex	2021-01-27 22:06:08 UTC (rev 57539)
@@ -34,7 +34,7 @@
 % \pagestyle{empty}
 \setcounter{page}{46}
 
-\usepackage[Kashida=leaders+hrule,kashidastretch=0.14 em plus 0.5 em,hboxrecursion=On,vboxrecursion=On,color=red]{texnegar}
+\usepackage[Minimal=On,Kashida=leaders+hrule,kashidastretch=0.14 em plus 0.5 em,hboxrecursion=On,vboxrecursion=On,color=red]{texnegar}
 
 \begin{document}
 

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-glyph.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-glyph.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-glyph.tex	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-glyph.tex	2021-01-27 22:06:08 UTC (rev 57539)
@@ -14,7 +14,7 @@
 \setfontfamily\HMXKayhanSa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Sayeh}
 \setfontfamily\HMXKayhanNa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Navaar}
 
-\usepackage[Kashida=glyph,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar}  % Succeeds
+\usepackage[Minimal=On,Kashida=glyph,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar}  % Succeeds
 
 \usepackage{bidi}
 

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.tex	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.tex	2021-01-27 22:06:08 UTC (rev 57539)
@@ -14,7 +14,7 @@
 \setfontfamily\HMXKayhanSa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Sayeh}
 \setfontfamily\HMXKayhanNa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Navaar}
 
-\usepackage[Kashida=leaders+glyph,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar}  % Succeeds
+\usepackage[Minimal=On,Kashida=leaders+glyph,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar}  % Succeeds
 
 \usepackage{bidi}
 

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.tex	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.tex	2021-01-27 22:06:08 UTC (rev 57539)
@@ -14,7 +14,7 @@
 \setfontfamily\HMXKayhanSa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Sayeh}
 \setfontfamily\HMXKayhanNa[Script=Arabic,Language=Persian,Scale=4.5]{HM XKayhan Navaar}
 
-\usepackage[Kashida=leaders+hrule,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar}  % Succeeds
+\usepackage[Minimal=On,Kashida=leaders+hrule,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar}  % Succeeds
 
 \usepackage{bidi}
 

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-glyph.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-glyph.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-glyph.tex	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-glyph.tex	2021-01-27 22:06:08 UTC (rev 57539)
@@ -1,8 +1,8 @@
 \documentclass{report}
 
-\usepackage[Kashida=glyph,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar}  % Succeeds
+\usepackage[Minimal=On,Kashida=glyph,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar}  % Succeeds
 
-\usepackage[fontsloadable=true]{xepersian}
+\usepackage{xepersian}
 % \settextfont[Scale=4.5,Colour=darkgray]{XB Kayhan}
 \settextfont{HM XKayhan}
 \setlatintextfont[Scale=1.5,Colour=0000FF]{HM XKayhan}

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.tex	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.tex	2021-01-27 22:06:08 UTC (rev 57539)
@@ -1,8 +1,8 @@
 \documentclass{report}
 
-\usepackage[Kashida=leaders+glyph,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar}  % Succeeds
+\usepackage[Minimal=On,Kashida=leaders+glyph,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar}  % Succeeds
 
-\usepackage[fontsloadable=true]{xepersian}
+\usepackage{xepersian}
 % \settextfont[Scale=4.5,Colour=darkgray]{XB Kayhan}
 \settextfont{HM XKayhan}
 \setlatintextfont[Scale=1.5,Colour=0000FF]{HM XKayhan}

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.tex	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.tex	2021-01-27 22:06:08 UTC (rev 57539)
@@ -1,8 +1,8 @@
 \documentclass{report}
 
-\usepackage[Kashida=leaders+hrule,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar}  % Succeeds
+\usepackage[Minimal=On,Kashida=leaders+hrule,linebreakpenalty=8,kashidastretch=0.14 em plus 0.5 em,color=red]{texnegar}  % Succeeds
 
-\usepackage[fontsloadable=true]{xepersian}
+\usepackage{xepersian}
 % \settextfont[Scale=4.5,Colour=darkgray]{XB Kayhan}
 \settextfont{HM XKayhan}
 \setlatintextfont[Scale=1.5,Colour=0000FF]{HM XKayhan}

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/xepersian-XB.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/xepersian-XB.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/texnegar/xepersian-XB.tex	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/doc/latex/texnegar/xepersian-XB.tex	2021-01-27 22:06:08 UTC (rev 57539)
@@ -47,7 +47,6 @@
  \vspace{20pt}\makebox{\textsf{File:} \texttt{TEXMFDIST/doc/latex/texnegar/xepersian-XB.tex}} \\
  \vspace{20pt}
 
-
 {\Large
 \begin{tabular}{ll}
   \textsf{Font:} & \textsf{XB Kayhan} \\

Modified: trunk/Master/texmf-dist/source/latex/texnegar/texnegar.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/texnegar/texnegar.dtx	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/source/latex/texnegar/texnegar.dtx	2021-01-27 22:06:08 UTC (rev 57539)
@@ -2,7 +2,7 @@
 %
 % This is file `texnegar.dtx'
 %
-% Copyright (C) 2020 Hossein Movahhedian
+% Copyright (C) 2020-2021 Hossein Movahhedian
 %
 % It may be distributed and/or modified under the LaTeX Project Public License,
 % version 1.3c or higher (your choice). The latest version of
@@ -63,6 +63,7 @@
 %</driver|package>
 %<*driver>
 \documentclass[full]{l3doc}
+\usepackage{enumitem}
 \begin{document}
   \DocInput{\jobname.dtx}
 \end{document}
@@ -88,7 +89,7 @@
 % \def\TeXNegar{\TeX Negar}
 % 
 % \title{^^A
-%   The \TeXNegar{} package\\Kashida justification in LuaTeX and XeTeX\\Source code documentation^^A
+%   The \textsf{texnegar} package\\Kashida justification in LuaTeX and XeTeX\\Source code documentation^^A
 % }
 %
 % \author{^^A
@@ -100,7 +101,7 @@
 %    }^^A
 % }
 %
-% \date{Released \quad 2020-08-30 \quad v0.1b}
+% \date{Released \quad 2021-01-27 \quad v0.1c}
 %
 % \maketitle
 %
@@ -130,9 +131,14 @@
 \RequirePackage{xparse}
 \RequirePackage{l3keys2e}
 \RequirePackage{graphicx}[2019-11-30]
+\RequirePackage{array}[2019-10-01]
 \RequirePackage[dvipsnames,svgnames,x11names]{xcolor}[2016/05/11]
-\ProvidesExplPackage {texnegar} {2020-08-30} {0.1b} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\RequirePackage{fontspec}[2020/02/21]
+\RequirePackage{newverbs}[2010/09/02]
+\RequirePackage{environ}[2014/05/04]
 
+\ProvidesExplPackage {texnegar} {2021-01-27} {0.1c} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+
 \sys_if_engine_luatex:T
   {
     \RequirePackageWithOptions{texnegar-luatex}
@@ -159,7 +165,7 @@
 %
 %    \begin{macrocode}
 %<*texnegar-luatex-sty>
-\ProvidesExplPackage {texnegar-luatex} {2020-08-30} {0.1b} { Full implementation of kashida feature in xetex and luatex }
+\ProvidesExplPackage {texnegar-luatex} {2021-01-27} {0.1c} { Full implementation of kashida feature in xetex and luatex }
 
 \tex_input:D { texnegar-ini.tex }
 
@@ -195,7 +201,7 @@
 %    \begin{macrocode}
 %<*texnegar-xetex-sty>
 \RequirePackage{zref-savepos}[2020-03-03]
-\ProvidesExplPackage {texnegar-xetex} {2020-08-30} {0.1b} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\ProvidesExplPackage {texnegar-xetex} {2021-01-27} {0.1c} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
 
 \tex_input:D { texnegar-ini.tex }
 
@@ -212,7 +218,7 @@
 %
 %    \begin{macrocode}
 %<*texnegar-ini-tex>
-\ProvidesExplFile {texnegar-ini.tex} {2020-08-30} {0.1b} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\ProvidesExplFile {texnegar-ini.tex} {2021-01-27} {0.1c} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
 
 \def\TeXNegar{\TeX Negar}
 
@@ -266,6 +272,10 @@
 
 \dim_new:N \l_texnegar_diff_pos_dim
 
+\bool_set_false:N \l_texnegar_minimal_bool
+\tl_set:Nn \l_texnegar_minimal_off_tl { Off }
+\tl_set:Nn \l_texnegar_minimal_on_tl { On }
+
 \bool_set_false:N \l_texnegar_kashida_fix_bool
 
 \bool_set_false:N \l_texnegar_kashida_glyph_bool
@@ -399,6 +409,22 @@
 
 \keys_define:nn { texnegar }
   {
+    Minimal .code:n =
+      {
+        \tl_set:Nn \l_tmpa_tl { #1 }
+        \tl_case:Nn \l_tmpa_tl
+          {
+            \l_texnegar_minimal_off_tl
+              {
+                \bool_set_false:N \l_texnegar_minimal_bool
+              }
+            \l_texnegar_minimal_on_tl
+              {
+                \bool_set_true:N \l_texnegar_minimal_bool
+              }
+          }
+      } ,
+
     Kashida .code:n =
       {
         \tl_set:Nn \l_tmpa_tl { #1 }
@@ -530,7 +556,10 @@
         \sys_if_engine_luatex:T
           {
             \convertcolorspec{named}{\l_texnegar_color_tl}{rgb}\l_texnegar_color_rgb_tl
-            \directlua{l_texnegar_color_rgb_tl = "\l_texnegar_color_rgb_tl"}
+            \sys_if_engine_luatex:T
+              {
+                \directlua{l_texnegar_color_rgb_tl = "\l_texnegar_color_rgb_tl"}
+              }
           }
       } ,
 
@@ -602,6 +631,11 @@
 %% % \newif\if at Kashida@XB at fix
 %% % \makeatother
 
+\bool_if:NF \l_texnegar_minimal_bool
+  {
+    \input texnegar-luabidi.tex
+  }
+
  \endinput
 %</texnegar-ini-tex>
 %    \end{macrocode}
@@ -609,7 +643,7 @@
 % \subsection{File: \texttt{texnegar-common-kashida.tex}}
 %    \begin{macrocode}
 %<*texnegar-common-kashida-tex>
-\ProvidesExplFile {texnegar-common-kashida.tex} {2020-08-30} {0.1b} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\ProvidesExplFile {texnegar-common-kashida.tex} {2021-01-27} {0.1c} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
 
 \bool_if:NT \l_texnegar_ligature_bool
 {
@@ -677,6 +711,8 @@
       \tl_use:N \l_texnegar_line_break_tl
     }
 }
+
+ \endinput
 %</texnegar-common-kashida-tex>
 %    \end{macrocode}
 %
@@ -684,7 +720,7 @@
 %
 %    \begin{macrocode}
 %<*texnegar-xetex-kashida-tex>
-\ProvidesExplFile {texnegar-xetex-kashida.tex} {2020-08-30} {0.1b} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\ProvidesExplFile {texnegar-xetex-kashida.tex} {2021-01-27} {0.1c} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
 
 \newXeTeXintercharclass \c_texnegar_d_charclass % dual-joiner class
 \newXeTeXintercharclass \c_texnegar_l_charclass % lam
@@ -895,7 +931,7 @@
 --
 -- texnegar.dtx  (with options: `texnegar-char-table-lua')
 --
--- Copyright (C) 2020 Hossein Movahhedian
+-- Copyright (C) 2020-2021 Hossein Movahhedian
 --
 -- It may be distributed and/or modified under the LaTeX Project Public License,
 -- version 1.3c or higher (your choice). The latest version of
@@ -905,8 +941,8 @@
 -- local texnegar_char_table  = texnegar_char_table
 -- texnegar_char_table.module = {
 --     name                   = "texnegar_char_table",
---     version                = "0.1b",
---     date                   = "2020-08-30",
+--     version                = "0.1c",
+--     date                   = "2021-01-27",
 --     description            = "Full implementation of kashida feature in XeLaTex and LuaLaTeX",
 --     author                 = "Hossein Movahhedian",
 --     copyright              = "Hossein Movahhedian",
@@ -919,6 +955,84 @@
 -- texnegar_char_table.warning = warn or (function (s) luatexbase.module_warning("texnegar_char_table", s) end)
 -- texnegar_char_table.error   = err  or (function (s) luatexbase.module_error("texnegar_char_table", s)   end)
 
+local peCharTableDigit  = {
+  [1632] = utf8.char(1632),  -- "٠",  utf8.codepoint("٠") == 1632,  "\u{0660}", ARABIC-INDIC DIGIT ZERO
+  [1633] = utf8.char(1633),  -- "١",  utf8.codepoint("١") == 1633,  "\u{0661}", ARABIC-INDIC DIGIT ONE
+  [1634] = utf8.char(1634),  -- "٢",  utf8.codepoint("٢") == 1634,  "\u{0662}", ARABIC-INDIC DIGIT TWO
+  [1635] = utf8.char(1635),  -- "٣",  utf8.codepoint("٣") == 1635,  "\u{0663}", ARABIC-INDIC DIGIT THREE
+  [1636] = utf8.char(1636),  -- "٤",  utf8.codepoint("٤") == 1636,  "\u{0664}", ARABIC-INDIC DIGIT FOUR
+  [1637] = utf8.char(1637),  -- "٥",  utf8.codepoint("٥") == 1637,  "\u{0665}", ARABIC-INDIC DIGIT FIVE
+  [1638] = utf8.char(1638),  -- "٦",  utf8.codepoint("٦") == 1638,  "\u{0666}", ARABIC-INDIC DIGIT SIX
+  [1639] = utf8.char(1639),  -- "٧",  utf8.codepoint("٧") == 1639,  "\u{0667}", ARABIC-INDIC DIGIT SEVEN
+  [1640] = utf8.char(1640),  -- "٨",  utf8.codepoint("٨") == 1640,  "\u{0668}", ARABIC-INDIC DIGIT EIGHT
+  [1641] = utf8.char(1641),  -- "٩",  utf8.codepoint("٩") == 1641,  "\u{0669}", ARABIC-INDIC DIGIT NINE
+  [1780] = utf8.char(1780),  -- "۴",  utf8.codepoint("۴") == 1780,  "\u{06F4}", EXTENDED ARABIC-INDIC DIGIT FOUR
+  [1781] = utf8.char(1781),  -- "۵",  utf8.codepoint("۵") == 1781,  "\u{06F5}", EXTENDED ARABIC-INDIC DIGIT FIVE
+  [1782] = utf8.char(1782),  -- "۶",  utf8.codepoint("۶") == 1782,  "\u{06F6}", EXTENDED ARABIC-INDIC DIGIT SIX
+}
+
+local peCharTablePunctuation  = {
+  [1548] = utf8.char(1548),  -- "،",  utf8.codepoint("،") == 1548,  "\u{060C}", ARABIC COMMA
+  [1549] = utf8.char(1549),  -- "؍",  utf8.codepoint("؍") == 1549,  "\u{060D}", ARABIC DATE SEPARATOR
+  [1563] = utf8.char(1563),  -- "؛",  utf8.codepoint("؛") == 1563,  "\u{061B}", ARABIC SEMICOLON
+  [1567] = utf8.char(1567),  -- "؟",  utf8.codepoint("؟") == 1567,  "\u{061F}", ARABIC QUESTION MARK
+  [1642] = utf8.char(1642),  -- "٪",  utf8.codepoint("٪") == 1642,  "\u{066A}", ARABIC PERCENT SIGN
+  [1643] = utf8.char(1643),  -- "٫",  utf8.codepoint("٫") == 1643,  "\u{066B}", ARABIC DECIMAL SEPARATOR
+  [1644] = utf8.char(1644),  -- "٬",  utf8.codepoint("٬") == 1644,  "\u{066C}", ARABIC THOUSANDS SEPARATOR
+  [1645] = utf8.char(1645),  -- "٭",  utf8.codepoint("٭") == 1645,  "\u{066D}", ARABIC FIVE POINTED STAR
+}
+
+local peCharTable  = {
+  [1569] = utf8.char(1569),    -- "ء",  utf8.codepoint("ء") == 1569,  "\u{0621}", ARABIC LETTER ALEF HAMZA
+  [1570] = utf8.char(1570),    -- "آ",  utf8.codepoint("آ") == 1570,  "\u{0622}", ARABIC LETTER ALEF WITH MADDA ABOVE
+  [1571] = utf8.char(1571),    -- "أ",  utf8.codepoint("أ") == 1571,  "\u{0623}", ARABIC LETTER ALEF WITH HAMZA ABOVE
+  [1572] = utf8.char(1572),    -- "ؤ",  utf8.codepoint("ؤ") == 1572,  "\u{0624}", ARABIC LETTER WAW WITH HAMZA ABOVE
+  [1573] = utf8.char(1573),    -- "إ",  utf8.codepoint("إ") == 1573,  "\u{0625}", ARABIC LETTER ALEF WITH HAMZA BELOW
+  [1574] = utf8.char(1574),    -- "ئ",  utf8.codepoint("ئ") == 1574,  "\u{0626}", ARABIC LETTER YEH WITH HAMZA ABOVE
+  [1575] = utf8.char(1575),    -- "ا",  utf8.codepoint("ا") == 1575,  "\u{0627}", ARABIC LETTER ALEF
+  [1576] = utf8.char(1576),    -- "ب",  utf8.codepoint("ب") == 1576,  "\u{0628}", ARABIC LETTER BEH
+  [1577] = utf8.char(1577),    -- "ة",  utf8.codepoint("ة") == 1577,  "\u{0629}", ARABIC LETTER TEH MARBUTA
+  [1578] = utf8.char(1578),    -- "ت",  utf8.codepoint("ت") == 1578,  "\u{062A}", ARABIC LETTER TEH
+  [1579] = utf8.char(1579),    -- "ث",  utf8.codepoint("ث") == 1579,  "\u{062B}", ARABIC LETTER THEH
+  [1580] = utf8.char(1580),    -- "ج",  utf8.codepoint("ج") == 1580,  "\u{062C}", ARABIC LETTER JEEM
+  [1581] = utf8.char(1581),    -- "ح",  utf8.codepoint("ح") == 1581,  "\u{062D}", ARABIC LETTER HAH
+  [1582] = utf8.char(1582),    -- "خ",  utf8.codepoint("خ") == 1582,  "\u{062E}", ARABIC LETTER KHAH
+  [1583] = utf8.char(1583),    -- "د",  utf8.codepoint("د") == 1583,  "\u{062F}", ARABIC LETTER DAL
+  [1584] = utf8.char(1584),    -- "ذ",  utf8.codepoint("ذ") == 1584,  "\u{0630}", ARABIC LETTER THAL
+  [1585] = utf8.char(1585),    -- "ر",  utf8.codepoint("ر") == 1585,  "\u{0631}", ARABIC LETTER REH
+  [1586] = utf8.char(1586),    -- "ز",  utf8.codepoint("ز") == 1586,  "\u{0632}", ARABIC LETTER ZAIN
+  [1587] = utf8.char(1587),    -- "س",  utf8.codepoint("س") == 1587,  "\u{0633}", ARABIC LETTER SEEN
+  [1588] = utf8.char(1588),    -- "ش",  utf8.codepoint("ش") == 1588,  "\u{0634}", ARABIC LETTER SHEEN
+  [1589] = utf8.char(1589),    -- "ص",  utf8.codepoint("ص") == 1589,  "\u{0635}", ARABIC LETTER SAD
+  [1590] = utf8.char(1590),    -- "ض",  utf8.codepoint("ض") == 1590,  "\u{0636}", ARABIC LETTER DAD
+  [1591] = utf8.char(1591),    -- "ط",  utf8.codepoint("ط") == 1591,  "\u{0637}", ARABIC LETTER TAH
+  [1592] = utf8.char(1592),    -- "ظ",  utf8.codepoint("ظ") == 1592,  "\u{0638}", ARABIC LETTER ZAH
+  [1593] = utf8.char(1593),    -- "ع",  utf8.codepoint("ع") == 1593,  "\u{0639}", ARABIC LETTER AIN
+  [1594] = utf8.char(1594),    -- "غ",  utf8.codepoint("غ") == 1594,  "\u{063A}", ARABIC LETTER GHAIN
+  [1601] = utf8.char(1601),    -- "ف",  utf8.codepoint("ف") == 1601,  "\u{0641}", ARABIC LETTER FEH
+  [1602] = utf8.char(1602),    -- "ق",  utf8.codepoint("ق") == 1602,  "\u{0642}", ARABIC LETTER QAF
+  [1603] = utf8.char(1603),    -- "ك",  utf8.codepoint("ك") == 1603,  "\u{0643}", ARABIC LETTER KAF
+  [1604] = utf8.char(1604),    -- "ل",  utf8.codepoint("ل") == 1604,  "\u{0644}", ARABIC LETTER LAM
+  [1605] = utf8.char(1605),    -- "م",  utf8.codepoint("م") == 1605,  "\u{0645}", ARABIC LETTER MEEM
+  [1606] = utf8.char(1606),    -- "ن",  utf8.codepoint("ن") == 1606,  "\u{0646}", ARABIC LETTER NOON
+  [1607] = utf8.char(1607),    -- "ه",  utf8.codepoint("ه") == 1607,  "\u{0647}", ARABIC LETTER HEH
+  [1608] = utf8.char(1608),    -- "و",  utf8.codepoint("و") == 1608,  "\u{0648}", ARABIC LETTER WAW
+  [1609] = utf8.char(1609),    -- "ى",  utf8.codepoint("ى") == 1609,  "\u{0649}", ARABIC LETTER ALEF MAKSURA
+  [1610] = utf8.char(1610),    -- "ي",  utf8.codepoint("ي") == 1610,  "\u{064A}", ARABIC LETTER YEH
+  [1662] = utf8.char(1662),    -- "پ",  utf8.codepoint("پ") == 1662,  "\u{067E}", ARABIC LETTER PEH
+  [1670] = utf8.char(1670),    -- "چ",  utf8.codepoint("چ") == 1670,  "\u{0686}", ARABIC LETTER TCHEH
+  [1688] = utf8.char(1688),    -- "ژ",  utf8.codepoint("ژ") == 1688,  "\u{0698}", ARABIC LETTER JEH
+  [1705] = utf8.char(1705),    -- "ک",  utf8.codepoint("ک") == 1705,  "\u{06A9}", ARABIC LETTER KEHEH
+  [1706] = utf8.char(1706),    -- "ڪ",  utf8.codepoint("ڪ") == 1706,  "\u{06AA}", ARABIC LETTER SWASH KAF
+  [1711] = utf8.char(1711),    -- "گ",  utf8.codepoint("گ") == 1711,  "\u{06AF}", ARABIC LETTER GAF
+  [1726] = utf8.char(1726),    -- "ھ",  utf8.codepoint("ھ") == 1726,  "\u{06BE}", ARABIC LETTER HEH DOACHASHMEE
+  [1728] = utf8.char(1728),    -- "ۀ",  utf8.codepoint("ۀ") == 1728,  "\u{06C0}", ARABIC LETTER HEH WITH YEH ABOVE
+  [1740] = utf8.char(1740),    -- "ی",  utf8.codepoint("ی") == 1740,  "\u{06CC}", ARABIC LETTER FARSI YEH
+  [1749] = utf8.char(1749),    -- "ە",  utf8.codepoint("ە") == 1740,  "\u{06D5}", ARABIC LETTER AE
+  [65275] = utf8.char(65275),  -- "ﻻ",  utf8.codepoint("ﻻ") == 65275,  "\u{FEFB}", ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM
+  [65276] = utf8.char(65276),  -- "ﻼ",  utf8.codepoint("ﻼ") == 65276,  "\u{FEFC}", ARABIC LIGATURE LAM WITH ALEF FINAL FORM
+}
+
 local peCharTableInitial  = {
   [64344] = utf8.char(64344),  -- "ﭘ",  utf8.codepoint("ﭘ") == 64344,  "\u{FB58}", INITIAL FORM PEH
   [64380] = utf8.char(64380),  -- "ﭼ",  utf8.codepoint("ﭼ") == 64380,  "\u{FB7C}", INITIAL FORM TCHEH
@@ -1042,7 +1156,7 @@
 --
 -- texnegar.dtx  (with options: `texnegar-lua')
 --
--- Copyright (C) 2020 Hossein Movahhedian
+-- Copyright (C) 2020-2021 Hossein Movahhedian
 --
 -- It may be distributed and/or modified under the LaTeX Project Public License,
 -- version 1.3c or higher (your choice). The latest version of
@@ -1052,8 +1166,8 @@
 -- local texnegar    = texnegar
 -- texnegar.module   = {
 --     name          = "texnegar",
---     version       = "0.1b",
---     date          = "2020-08-30",
+--     version       = "0.1c",
+--     date          = "2021-01-27",
 --     description   = "Full implementation of kashida feature in XeLaTex and LuaLaTeX",
 --     author        = "Hossein Movahhedian",
 --     copyright     = "Hossein Movahhedian",
@@ -1066,7 +1180,112 @@
 -- texnegar.warning = warn or (function (s) luatexbase.module_warning("texnegar", s) end)
 -- texnegar.error   = err  or (function (s) luatexbase.module_error("texnegar", s)   end)
 
+local debug_getinfo = debug.getinfo
+local string_format = string.format
+
+function TableLength(t)
+    local i = 0
+    for _ in pairs(t) do
+        i = i + 1
+    end
+    return i
+end
+
 tex.enableprimitives('',tex.extraprimitives ())
+
+local range_tble = {
+    [1536] = 1791,
+    [1872] = 1919,
+    [2208] = 2274,
+    [8204] = 8297,
+    [64336] = 65023,
+    [65136] = 65279,
+    [126464] = 126719,
+    [983040] = 1048575
+  }
+
+local tbl_fonts_used = { }
+local tbl_fonts_chars = { }
+local tbl_fonts_chars_init = { }
+local tbl_fonts_chars_medi = { }
+local tbl_fonts_chars_fina = { }
+
+local pattern_list = {
+  ".*%.(ini)t?$",  ".*%.(ini)t?%..*",
+  ".*%.(med)i?$",  ".*%.(med)i?%..*",
+  ".*%.(fin)a?$",  ".*%.(fin)a?%..*",
+
+  ".*_(ini)t?$",    ".*_(ini)t?_.*",
+  ".*_(med)i?$",    ".*_(med)i?_.*",
+  ".*_(fin)a?$",    ".*_(fin)a?_.*",
+
+  ".*_(AltIni)t?[0-9]?$",    ".*_(AltIni)t?[0-9]?_.*",
+  ".*_(AltMed)i?[0-9]?$",    ".*_(AltMed)i?[0-9]?_.*",
+  ".*_(AltFin)a?[0-9]?$",    ".*_(AltFin)a?[0-9]?_.*",
+}
+
+function GetFontsChars()
+    local funcName    = debug_getinfo(1).name
+    local funcNparams = debug_getinfo(1).nparams
+
+    for f_num = 1, font.max() do
+        local f_tmp = font.fonts[f_num]
+        if  f_tmp then
+            local f_tmp_fontname = f_tmp.fontname
+            if  f_tmp_fontname then
+                local f_id_tmp       = font.getfont(f_num)
+                local f_fontname_tmp = f_id_tmp.fontname
+                local f_filename_tmp = f_id_tmp.filename
+                if  not tbl_fonts_used[f_fontname_tmp] then
+                    tbl_fonts_used[f_fontname_tmp] = {f_filename_tmp, f_id_tmp}
+                end
+            end
+        end
+    end
+
+    for f_fontname, v in pairs(tbl_fonts_used) do
+        f_filename = v[1]
+        f_id = v[2]
+        if  not tbl_fonts_chars[f_fontname] then
+            tbl_fonts_chars[f_fontname] = { }
+            tbl_fonts_chars_init[f_fontname] = { }
+            tbl_fonts_chars_medi[f_fontname] = { }
+            tbl_fonts_chars_fina[f_fontname] = { }
+            local f = fontloader.open(f_filename)
+            local char_name
+            local char_unicode
+            local char_class
+            for k, v in pairs(range_tble) do
+                for glyph_idx = k, v do
+                    if  f_id.characters[glyph_idx] then
+                        char_name    = f.glyphs[f_id.characters[glyph_idx].index].name
+                        char_unicode = f.glyphs[f_id.characters[glyph_idx].index].unicode
+                        char_class   = f.glyphs[f_id.characters[glyph_idx].index].class
+                        if  not tbl_fonts_chars[f_fontname][glyph_idx] then
+                            if  string.match(f_fontname, "^(Amiri).*") == "Amiri" and char_name == 'uni0640.long1' then
+                                current_kashida_unicode = glyph_idx
+                            end
+                            tbl_fonts_chars[f_fontname][glyph_idx] = {char_name, char_unicode, char_class}
+                            for _, pattern in ipairs( pattern_list ) do
+                                local pos_alt = string.match(char_name, pattern)
+                                if  pos_alt == 'ini' or pos_alt == 'AltIni' then
+                                    tbl_fonts_chars_init[f_fontname][glyph_idx] = {char_name, char_unicode, char_class}
+                                elseif pos_alt == 'med' or pos_alt == 'AltMed' then
+                                    tbl_fonts_chars_medi[f_fontname][glyph_idx] = {char_name, char_unicode, char_class}
+                                elseif pos_alt == 'fin' or pos_alt == 'AltFin' then
+                                    tbl_fonts_chars_fina[f_fontname][glyph_idx] = {char_name, char_unicode, char_class}
+                                end
+                            end
+                        end
+                    end
+                end
+            end
+            fontloader.close(f)
+        end
+    end
+    return tbl_fonts_used, tbl_fonts_chars, tbl_fonts_chars_init, tbl_fonts_chars_medi, tbl_fonts_chars_fina
+end
+
 dofile(kpse.find_file("texnegar-ini.lua"))
 --
 --
@@ -1086,7 +1305,7 @@
 --
 -- texnegar.dtx  (with options: `texnegar-ini-lua')
 --
--- Copyright (C) 2020 Hossein Movahhedian
+-- Copyright (C) 2020-2021 Hossein Movahhedian
 --
 -- It may be distributed and/or modified under the LaTeX Project Public License,
 -- version 1.3c or higher (your choice). The latest version of
@@ -1096,8 +1315,8 @@
 -- local texnegar_ini  = texnegar_ini
 -- texnegar_ini.module = {
 --     name            = "texnegar_ini",
---     version         = "0.1b",
---     date            = "2020-08-30",
+--     version         = "0.1c",
+--     date            = "2021-01-27",
 --     description     = "Full implementation of kashida feature in XeLaTex and LuaLaTeX",
 --     author          = "Hossein Movahhedian",
 --     copyright       = "Hossein Movahhedian",
@@ -1121,7 +1340,7 @@
     end
 end
 
-dofile(kpse.find_file("texnegar-luatex-kashida.lua"))   -- leaders + resized glyph U+0640
+dofile(kpse.find_file("texnegar-luatex-kashida.lua"))
 --
 --
 -- End of file `texnegar-ini.lua'.
@@ -1140,7 +1359,7 @@
 --
 -- texnegar.dtx  (with options: `texnegar-luatex-kashida-lua')
 --
--- Copyright (C) 2020 Hossein Movahhedian
+-- Copyright (C) 2020-2021 Hossein Movahhedian
 --
 -- It may be distributed and/or modified under the LaTeX Project Public License,
 -- version 1.3c or higher (your choice). The latest version of
@@ -1150,8 +1369,8 @@
 -- local texnegar_luatex_kashida  = texnegar_luatex_kashida
 -- texnegar_luatex_kashida.module = {
 --     name                       = "texnegar_luatex_kashida",
---     version                    = "0.1b",
---     date                       = "2020-08-30",
+--     version                    = "0.1c",
+--     date                       = "2021-01-27",
 --     description                = "Full implementation of kashida feature in XeLaTex and LuaLaTeX",
 --     author                     = "Hossein Movahhedian",
 --     copyright                  = "Hossein Movahhedian",
@@ -1306,7 +1525,7 @@
                     local ksh_unicode
                     ksh_unicode = font.getfont(in_font).resources.unicodes['kashida']
                     if  hbox_num == 'l_texnegar_k_box' then
-                        tp.char = kashida_unicode
+                        tp.char = current_kashida_unicode or kashida_unicode
                     elseif hbox_num == 'l_texnegar_ksh_box' then
                         tp.char = ksh_unicode
                         tn_width = tn.width
@@ -1402,7 +1621,11 @@
 
     kashida_node.subtype = kashida_subtype
     kashida_node.font    = font_current
-    kashida_node.char    = kashida_unicode
+    if  string.match(font_name, "^(Amiri).*") == "Amiri" then
+        kashida_node.char = current_kashida_unicode
+    else
+        kashida_node.char = kashida_unicode
+    end
     kashida_node.lang    = tex.language
 
     kashida_width  = kashida_node.width
@@ -1443,6 +1666,12 @@
             if  tn_id == 12 and tn_subtype == 100 then
                 local t_hbox = node.new(HLIST)
                 local t_hrule = node.copy(tn)
+
+                if  string.match(font_name, "^(Amiri).*") == "Amiri" then
+                    t_hrule.leader.height = kashida_height
+                    t_hrule.leader.depth  = kashida_depth
+                end
+
                 t_hbox.head = node.insert_after(t_hbox.list, t_hbox.head,t_hrule)
                 t_plb_node.head = node.insert_after(t_plb_node.list, tn, t_hbox)
 
@@ -1608,6 +1837,39 @@
     local funcName    = debug_getinfo(1).name
     local funcNparams = debug_getinfo(1).nparams
 
+    funcName = "PostLineBreakFilter"
+
+    local tbl_fonts_used = { }
+    local tbl_fonts_chars = { }
+    local tbl_fonts_chars_init = { }
+    local tbl_fonts_chars_medi = { }
+    local tbl_fonts_chars_fina = { }
+    tbl_fonts_used, tbl_fonts_chars, tbl_fonts_chars_init, tbl_fonts_chars_medi, tbl_fonts_chars_fina = GetFontsChars()
+
+    for k1, v1 in pairs(tbl_fonts_chars_init) do
+        for k2, v2 in pairs(tbl_fonts_chars_init[k1]) do
+            if  k2 and not peCharTableInitial[k2] then
+                peCharTableInitial[k2] = utf8.char(k2)
+            end
+        end
+    end
+
+    for k1, v1 in pairs(tbl_fonts_chars_medi) do
+        for k2, v2 in pairs(tbl_fonts_chars_medi[k1]) do
+            if  k2 and not peCharTableMedial[k2] then
+                 peCharTableMedial[k2] = utf8.char(k2)
+            end
+        end
+    end
+
+    for k1, v1 in pairs(tbl_fonts_chars_fina) do
+        for k2, v2 in pairs(tbl_fonts_chars_fina[k1]) do
+            if  k2 and not peCharTableFinal[k2] then
+                 peCharTableFinal[k2] = utf8.char(k2)
+            end
+        end
+    end
+
     tbl_hlist_nodes = {}
     tbl_vlist_nodes = {}
     for hlistNode in node.traverse(hboxes_stack) do
@@ -1673,22 +1935,27 @@
 % question-and-answer (Q\&A) websites to solve problems for which I am grateful.
 % I also would like to thank the developer teams of TeX's friends especially LaTeX, LuaTeX and XeTeX teams.
 %
-% \def\HistoryItem#1#2{\subsection*{[#1]} \addcontentsline{toc}{subsection}{[#1]} \item #2}
-% 
 % \section{Change History}
+%
+% \def\SubSecItem#1{\subsubsection*{\hskip 2em\large #1}\addcontentsline{toc}{subsection}{[#1]}}
+% \newenvironment{Itemize}{\begin{itemize}[leftmargin=4em]}{\end{itemize}}
+%
+% \SubSecItem{2020-08-29~v0.1a}
+% \begin{Itemize}
+%   \item First standalone version.
+% \end{Itemize}
+%
+% \SubSecItem{2020-08-30~v0.1b}
+% \begin{Itemize}
+%   \item Changed some file names.
+% \end{Itemize}
+%
+% \SubSecItem{2021-01-27~v0.1c}
+% \begin{Itemize}
+%   \item Added the option \texttt{Minimal} which is needed if texnegar is used for kashida implementaion only.
+%   \item Fixed the problem with \texttt{Scheherazade} and \texttt{Amiri} fonts.
+% \end{Itemize}
 % 
-% \begin{itemize}
-%   \let\tmpitemindent\itemindent
-%   \addtolength{\itemindent}{\leftmargin}
-%   \setlength{\parskip}{0pt}
-%   \setlength{\itemsep}{0pt}
-% 
-%   \HistoryItem{2020-08-29~v0.1a}{First standalone version.}
-% 
-%   \HistoryItem{2020-08-30~v0.1b}{Changed some file names.}
-% 
-% \end{itemize}
-% 
 % \section*{To Do's}
 %
 % To do

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-char-table.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-char-table.lua	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-char-table.lua	2021-01-27 22:06:08 UTC (rev 57539)
@@ -6,7 +6,7 @@
 --
 -- texnegar.dtx  (with options: `texnegar-char-table-lua')
 --
--- Copyright (C) 2020 Hossein Movahhedian
+-- Copyright (C) 2020-2021 Hossein Movahhedian
 --
 -- It may be distributed and/or modified under the LaTeX Project Public License,
 -- version 1.3c or higher (your choice). The latest version of
@@ -16,8 +16,8 @@
 -- local texnegar_char_table  = texnegar_char_table
 -- texnegar_char_table.module = {
 --     name                   = "texnegar_char_table",
---     version                = "0.1b",
---     date                   = "2020-08-30",
+--     version                = "0.1c",
+--     date                   = "2021-01-27",
 --     description            = "Full implementation of kashida feature in XeLaTex and LuaLaTeX",
 --     author                 = "Hossein Movahhedian",
 --     copyright              = "Hossein Movahhedian",
@@ -30,6 +30,84 @@
 -- texnegar_char_table.warning = warn or (function (s) luatexbase.module_warning("texnegar_char_table", s) end)
 -- texnegar_char_table.error   = err  or (function (s) luatexbase.module_error("texnegar_char_table", s)   end)
 
+local peCharTableDigit  = {
+  [1632] = utf8.char(1632),  -- "٠",  utf8.codepoint("٠") == 1632,  "\u{0660}", ARABIC-INDIC DIGIT ZERO
+  [1633] = utf8.char(1633),  -- "١",  utf8.codepoint("١") == 1633,  "\u{0661}", ARABIC-INDIC DIGIT ONE
+  [1634] = utf8.char(1634),  -- "٢",  utf8.codepoint("٢") == 1634,  "\u{0662}", ARABIC-INDIC DIGIT TWO
+  [1635] = utf8.char(1635),  -- "٣",  utf8.codepoint("٣") == 1635,  "\u{0663}", ARABIC-INDIC DIGIT THREE
+  [1636] = utf8.char(1636),  -- "٤",  utf8.codepoint("٤") == 1636,  "\u{0664}", ARABIC-INDIC DIGIT FOUR
+  [1637] = utf8.char(1637),  -- "٥",  utf8.codepoint("٥") == 1637,  "\u{0665}", ARABIC-INDIC DIGIT FIVE
+  [1638] = utf8.char(1638),  -- "٦",  utf8.codepoint("٦") == 1638,  "\u{0666}", ARABIC-INDIC DIGIT SIX
+  [1639] = utf8.char(1639),  -- "٧",  utf8.codepoint("٧") == 1639,  "\u{0667}", ARABIC-INDIC DIGIT SEVEN
+  [1640] = utf8.char(1640),  -- "٨",  utf8.codepoint("٨") == 1640,  "\u{0668}", ARABIC-INDIC DIGIT EIGHT
+  [1641] = utf8.char(1641),  -- "٩",  utf8.codepoint("٩") == 1641,  "\u{0669}", ARABIC-INDIC DIGIT NINE
+  [1780] = utf8.char(1780),  -- "۴",  utf8.codepoint("۴") == 1780,  "\u{06F4}", EXTENDED ARABIC-INDIC DIGIT FOUR
+  [1781] = utf8.char(1781),  -- "۵",  utf8.codepoint("۵") == 1781,  "\u{06F5}", EXTENDED ARABIC-INDIC DIGIT FIVE
+  [1782] = utf8.char(1782),  -- "۶",  utf8.codepoint("۶") == 1782,  "\u{06F6}", EXTENDED ARABIC-INDIC DIGIT SIX
+}
+
+local peCharTablePunctuation  = {
+  [1548] = utf8.char(1548),  -- "،",  utf8.codepoint("،") == 1548,  "\u{060C}", ARABIC COMMA
+  [1549] = utf8.char(1549),  -- "؍",  utf8.codepoint("؍") == 1549,  "\u{060D}", ARABIC DATE SEPARATOR
+  [1563] = utf8.char(1563),  -- "؛",  utf8.codepoint("؛") == 1563,  "\u{061B}", ARABIC SEMICOLON
+  [1567] = utf8.char(1567),  -- "؟",  utf8.codepoint("؟") == 1567,  "\u{061F}", ARABIC QUESTION MARK
+  [1642] = utf8.char(1642),  -- "٪",  utf8.codepoint("٪") == 1642,  "\u{066A}", ARABIC PERCENT SIGN
+  [1643] = utf8.char(1643),  -- "٫",  utf8.codepoint("٫") == 1643,  "\u{066B}", ARABIC DECIMAL SEPARATOR
+  [1644] = utf8.char(1644),  -- "٬",  utf8.codepoint("٬") == 1644,  "\u{066C}", ARABIC THOUSANDS SEPARATOR
+  [1645] = utf8.char(1645),  -- "٭",  utf8.codepoint("٭") == 1645,  "\u{066D}", ARABIC FIVE POINTED STAR
+}
+
+local peCharTable  = {
+  [1569] = utf8.char(1569),    -- "ء",  utf8.codepoint("ء") == 1569,  "\u{0621}", ARABIC LETTER ALEF HAMZA
+  [1570] = utf8.char(1570),    -- "آ",  utf8.codepoint("آ") == 1570,  "\u{0622}", ARABIC LETTER ALEF WITH MADDA ABOVE
+  [1571] = utf8.char(1571),    -- "أ",  utf8.codepoint("أ") == 1571,  "\u{0623}", ARABIC LETTER ALEF WITH HAMZA ABOVE
+  [1572] = utf8.char(1572),    -- "ؤ",  utf8.codepoint("ؤ") == 1572,  "\u{0624}", ARABIC LETTER WAW WITH HAMZA ABOVE
+  [1573] = utf8.char(1573),    -- "إ",  utf8.codepoint("إ") == 1573,  "\u{0625}", ARABIC LETTER ALEF WITH HAMZA BELOW
+  [1574] = utf8.char(1574),    -- "ئ",  utf8.codepoint("ئ") == 1574,  "\u{0626}", ARABIC LETTER YEH WITH HAMZA ABOVE
+  [1575] = utf8.char(1575),    -- "ا",  utf8.codepoint("ا") == 1575,  "\u{0627}", ARABIC LETTER ALEF
+  [1576] = utf8.char(1576),    -- "ب",  utf8.codepoint("ب") == 1576,  "\u{0628}", ARABIC LETTER BEH
+  [1577] = utf8.char(1577),    -- "ة",  utf8.codepoint("ة") == 1577,  "\u{0629}", ARABIC LETTER TEH MARBUTA
+  [1578] = utf8.char(1578),    -- "ت",  utf8.codepoint("ت") == 1578,  "\u{062A}", ARABIC LETTER TEH
+  [1579] = utf8.char(1579),    -- "ث",  utf8.codepoint("ث") == 1579,  "\u{062B}", ARABIC LETTER THEH
+  [1580] = utf8.char(1580),    -- "ج",  utf8.codepoint("ج") == 1580,  "\u{062C}", ARABIC LETTER JEEM
+  [1581] = utf8.char(1581),    -- "ح",  utf8.codepoint("ح") == 1581,  "\u{062D}", ARABIC LETTER HAH
+  [1582] = utf8.char(1582),    -- "خ",  utf8.codepoint("خ") == 1582,  "\u{062E}", ARABIC LETTER KHAH
+  [1583] = utf8.char(1583),    -- "د",  utf8.codepoint("د") == 1583,  "\u{062F}", ARABIC LETTER DAL
+  [1584] = utf8.char(1584),    -- "ذ",  utf8.codepoint("ذ") == 1584,  "\u{0630}", ARABIC LETTER THAL
+  [1585] = utf8.char(1585),    -- "ر",  utf8.codepoint("ر") == 1585,  "\u{0631}", ARABIC LETTER REH
+  [1586] = utf8.char(1586),    -- "ز",  utf8.codepoint("ز") == 1586,  "\u{0632}", ARABIC LETTER ZAIN
+  [1587] = utf8.char(1587),    -- "س",  utf8.codepoint("س") == 1587,  "\u{0633}", ARABIC LETTER SEEN
+  [1588] = utf8.char(1588),    -- "ش",  utf8.codepoint("ش") == 1588,  "\u{0634}", ARABIC LETTER SHEEN
+  [1589] = utf8.char(1589),    -- "ص",  utf8.codepoint("ص") == 1589,  "\u{0635}", ARABIC LETTER SAD
+  [1590] = utf8.char(1590),    -- "ض",  utf8.codepoint("ض") == 1590,  "\u{0636}", ARABIC LETTER DAD
+  [1591] = utf8.char(1591),    -- "ط",  utf8.codepoint("ط") == 1591,  "\u{0637}", ARABIC LETTER TAH
+  [1592] = utf8.char(1592),    -- "ظ",  utf8.codepoint("ظ") == 1592,  "\u{0638}", ARABIC LETTER ZAH
+  [1593] = utf8.char(1593),    -- "ع",  utf8.codepoint("ع") == 1593,  "\u{0639}", ARABIC LETTER AIN
+  [1594] = utf8.char(1594),    -- "غ",  utf8.codepoint("غ") == 1594,  "\u{063A}", ARABIC LETTER GHAIN
+  [1601] = utf8.char(1601),    -- "ف",  utf8.codepoint("ف") == 1601,  "\u{0641}", ARABIC LETTER FEH
+  [1602] = utf8.char(1602),    -- "ق",  utf8.codepoint("ق") == 1602,  "\u{0642}", ARABIC LETTER QAF
+  [1603] = utf8.char(1603),    -- "ك",  utf8.codepoint("ك") == 1603,  "\u{0643}", ARABIC LETTER KAF
+  [1604] = utf8.char(1604),    -- "ل",  utf8.codepoint("ل") == 1604,  "\u{0644}", ARABIC LETTER LAM
+  [1605] = utf8.char(1605),    -- "م",  utf8.codepoint("م") == 1605,  "\u{0645}", ARABIC LETTER MEEM
+  [1606] = utf8.char(1606),    -- "ن",  utf8.codepoint("ن") == 1606,  "\u{0646}", ARABIC LETTER NOON
+  [1607] = utf8.char(1607),    -- "ه",  utf8.codepoint("ه") == 1607,  "\u{0647}", ARABIC LETTER HEH
+  [1608] = utf8.char(1608),    -- "و",  utf8.codepoint("و") == 1608,  "\u{0648}", ARABIC LETTER WAW
+  [1609] = utf8.char(1609),    -- "ى",  utf8.codepoint("ى") == 1609,  "\u{0649}", ARABIC LETTER ALEF MAKSURA
+  [1610] = utf8.char(1610),    -- "ي",  utf8.codepoint("ي") == 1610,  "\u{064A}", ARABIC LETTER YEH
+  [1662] = utf8.char(1662),    -- "پ",  utf8.codepoint("پ") == 1662,  "\u{067E}", ARABIC LETTER PEH
+  [1670] = utf8.char(1670),    -- "چ",  utf8.codepoint("چ") == 1670,  "\u{0686}", ARABIC LETTER TCHEH
+  [1688] = utf8.char(1688),    -- "ژ",  utf8.codepoint("ژ") == 1688,  "\u{0698}", ARABIC LETTER JEH
+  [1705] = utf8.char(1705),    -- "ک",  utf8.codepoint("ک") == 1705,  "\u{06A9}", ARABIC LETTER KEHEH
+  [1706] = utf8.char(1706),    -- "ڪ",  utf8.codepoint("ڪ") == 1706,  "\u{06AA}", ARABIC LETTER SWASH KAF
+  [1711] = utf8.char(1711),    -- "گ",  utf8.codepoint("گ") == 1711,  "\u{06AF}", ARABIC LETTER GAF
+  [1726] = utf8.char(1726),    -- "ھ",  utf8.codepoint("ھ") == 1726,  "\u{06BE}", ARABIC LETTER HEH DOACHASHMEE
+  [1728] = utf8.char(1728),    -- "ۀ",  utf8.codepoint("ۀ") == 1728,  "\u{06C0}", ARABIC LETTER HEH WITH YEH ABOVE
+  [1740] = utf8.char(1740),    -- "ی",  utf8.codepoint("ی") == 1740,  "\u{06CC}", ARABIC LETTER FARSI YEH
+  [1749] = utf8.char(1749),    -- "ە",  utf8.codepoint("ە") == 1740,  "\u{06D5}", ARABIC LETTER AE
+  [65275] = utf8.char(65275),  -- "ﻻ",  utf8.codepoint("ﻻ") == 65275,  "\u{FEFB}", ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM
+  [65276] = utf8.char(65276),  -- "ﻼ",  utf8.codepoint("ﻼ") == 65276,  "\u{FEFC}", ARABIC LIGATURE LAM WITH ALEF FINAL FORM
+}
+
 local peCharTableInitial  = {
   [64344] = utf8.char(64344),  -- "ﭘ",  utf8.codepoint("ﭘ") == 64344,  "\u{FB58}", INITIAL FORM PEH
   [64380] = utf8.char(64380),  -- "ﭼ",  utf8.codepoint("ﭼ") == 64380,  "\u{FB7C}", INITIAL FORM TCHEH

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-common-kashida.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-common-kashida.tex	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-common-kashida.tex	2021-01-27 22:06:08 UTC (rev 57539)
@@ -12,7 +12,7 @@
 %% version 1.3c or higher (your choice). The latest version of
 %% this license is at: http://www.latex-project.org/lppl.txt
 %% 
-\ProvidesExplFile {texnegar-common-kashida.tex} {2020-08-30} {0.1b} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\ProvidesExplFile {texnegar-common-kashida.tex} {2021-01-27} {0.1c} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
 
 \bool_if:NT \l_texnegar_ligature_bool
 {
@@ -80,6 +80,8 @@
       \tl_use:N \l_texnegar_line_break_tl
     }
 }
+
+ \endinput
 %% 
 %%
 %% End of file `texnegar-common-kashida.tex'.

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.lua	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.lua	2021-01-27 22:06:08 UTC (rev 57539)
@@ -6,7 +6,7 @@
 --
 -- texnegar.dtx  (with options: `texnegar-ini-lua')
 --
--- Copyright (C) 2020 Hossein Movahhedian
+-- Copyright (C) 2020-2021 Hossein Movahhedian
 --
 -- It may be distributed and/or modified under the LaTeX Project Public License,
 -- version 1.3c or higher (your choice). The latest version of
@@ -16,8 +16,8 @@
 -- local texnegar_ini  = texnegar_ini
 -- texnegar_ini.module = {
 --     name            = "texnegar_ini",
---     version         = "0.1b",
---     date            = "2020-08-30",
+--     version         = "0.1c",
+--     date            = "2021-01-27",
 --     description     = "Full implementation of kashida feature in XeLaTex and LuaLaTeX",
 --     author          = "Hossein Movahhedian",
 --     copyright       = "Hossein Movahhedian",
@@ -41,7 +41,7 @@
     end
 end
 
-dofile(kpse.find_file("texnegar-luatex-kashida.lua"))   -- leaders + resized glyph U+0640
+dofile(kpse.find_file("texnegar-luatex-kashida.lua"))
 --
 --
 -- End of file `texnegar-ini.lua'.

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.tex	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.tex	2021-01-27 22:06:08 UTC (rev 57539)
@@ -12,7 +12,7 @@
 %% version 1.3c or higher (your choice). The latest version of
 %% this license is at: http://www.latex-project.org/lppl.txt
 %% 
-\ProvidesExplFile {texnegar-ini.tex} {2020-08-30} {0.1b} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\ProvidesExplFile {texnegar-ini.tex} {2021-01-27} {0.1c} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
 
 \def\TeXNegar{\TeX Negar}
 
@@ -66,6 +66,10 @@
 
 \dim_new:N \l_texnegar_diff_pos_dim
 
+\bool_set_false:N \l_texnegar_minimal_bool
+\tl_set:Nn \l_texnegar_minimal_off_tl { Off }
+\tl_set:Nn \l_texnegar_minimal_on_tl { On }
+
 \bool_set_false:N \l_texnegar_kashida_fix_bool
 
 \bool_set_false:N \l_texnegar_kashida_glyph_bool
@@ -199,6 +203,22 @@
 
 \keys_define:nn { texnegar }
   {
+    Minimal .code:n =
+      {
+        \tl_set:Nn \l_tmpa_tl { #1 }
+        \tl_case:Nn \l_tmpa_tl
+          {
+            \l_texnegar_minimal_off_tl
+              {
+                \bool_set_false:N \l_texnegar_minimal_bool
+              }
+            \l_texnegar_minimal_on_tl
+              {
+                \bool_set_true:N \l_texnegar_minimal_bool
+              }
+          }
+      } ,
+
     Kashida .code:n =
       {
         \tl_set:Nn \l_tmpa_tl { #1 }
@@ -330,7 +350,10 @@
         \sys_if_engine_luatex:T
           {
             \convertcolorspec{named}{\l_texnegar_color_tl}{rgb}\l_texnegar_color_rgb_tl
-            \directlua{l_texnegar_color_rgb_tl = "\l_texnegar_color_rgb_tl"}
+            \sys_if_engine_luatex:T
+              {
+                \directlua{l_texnegar_color_rgb_tl = "\l_texnegar_color_rgb_tl"}
+              }
           }
       } ,
 
@@ -402,6 +425,11 @@
 %% % \newif\if at Kashida@XB at fix
 %% % \makeatother
 
+\bool_if:NF \l_texnegar_minimal_bool
+  {
+    \input texnegar-luabidi.tex
+  }
+
  \endinput
 %% 
 %%

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex-kashida.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex-kashida.lua	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex-kashida.lua	2021-01-27 22:06:08 UTC (rev 57539)
@@ -6,7 +6,7 @@
 --
 -- texnegar.dtx  (with options: `texnegar-luatex-kashida-lua')
 --
--- Copyright (C) 2020 Hossein Movahhedian
+-- Copyright (C) 2020-2021 Hossein Movahhedian
 --
 -- It may be distributed and/or modified under the LaTeX Project Public License,
 -- version 1.3c or higher (your choice). The latest version of
@@ -16,8 +16,8 @@
 -- local texnegar_luatex_kashida  = texnegar_luatex_kashida
 -- texnegar_luatex_kashida.module = {
 --     name                       = "texnegar_luatex_kashida",
---     version                    = "0.1b",
---     date                       = "2020-08-30",
+--     version                    = "0.1c",
+--     date                       = "2021-01-27",
 --     description                = "Full implementation of kashida feature in XeLaTex and LuaLaTeX",
 --     author                     = "Hossein Movahhedian",
 --     copyright                  = "Hossein Movahhedian",
@@ -172,7 +172,7 @@
                     local ksh_unicode
                     ksh_unicode = font.getfont(in_font).resources.unicodes['kashida']
                     if  hbox_num == 'l_texnegar_k_box' then
-                        tp.char = kashida_unicode
+                        tp.char = current_kashida_unicode or kashida_unicode
                     elseif hbox_num == 'l_texnegar_ksh_box' then
                         tp.char = ksh_unicode
                         tn_width = tn.width
@@ -268,7 +268,11 @@
 
     kashida_node.subtype = kashida_subtype
     kashida_node.font    = font_current
-    kashida_node.char    = kashida_unicode
+    if  string.match(font_name, "^(Amiri).*") == "Amiri" then
+        kashida_node.char = current_kashida_unicode
+    else
+        kashida_node.char = kashida_unicode
+    end
     kashida_node.lang    = tex.language
 
     kashida_width  = kashida_node.width
@@ -309,6 +313,12 @@
             if  tn_id == 12 and tn_subtype == 100 then
                 local t_hbox = node.new(HLIST)
                 local t_hrule = node.copy(tn)
+
+                if  string.match(font_name, "^(Amiri).*") == "Amiri" then
+                    t_hrule.leader.height = kashida_height
+                    t_hrule.leader.depth  = kashida_depth
+                end
+
                 t_hbox.head = node.insert_after(t_hbox.list, t_hbox.head,t_hrule)
                 t_plb_node.head = node.insert_after(t_plb_node.list, tn, t_hbox)
 
@@ -474,6 +484,39 @@
     local funcName    = debug_getinfo(1).name
     local funcNparams = debug_getinfo(1).nparams
 
+    funcName = "PostLineBreakFilter"
+
+    local tbl_fonts_used = { }
+    local tbl_fonts_chars = { }
+    local tbl_fonts_chars_init = { }
+    local tbl_fonts_chars_medi = { }
+    local tbl_fonts_chars_fina = { }
+    tbl_fonts_used, tbl_fonts_chars, tbl_fonts_chars_init, tbl_fonts_chars_medi, tbl_fonts_chars_fina = GetFontsChars()
+
+    for k1, v1 in pairs(tbl_fonts_chars_init) do
+        for k2, v2 in pairs(tbl_fonts_chars_init[k1]) do
+            if  k2 and not peCharTableInitial[k2] then
+                peCharTableInitial[k2] = utf8.char(k2)
+            end
+        end
+    end
+
+    for k1, v1 in pairs(tbl_fonts_chars_medi) do
+        for k2, v2 in pairs(tbl_fonts_chars_medi[k1]) do
+            if  k2 and not peCharTableMedial[k2] then
+                 peCharTableMedial[k2] = utf8.char(k2)
+            end
+        end
+    end
+
+    for k1, v1 in pairs(tbl_fonts_chars_fina) do
+        for k2, v2 in pairs(tbl_fonts_chars_fina[k1]) do
+            if  k2 and not peCharTableFinal[k2] then
+                 peCharTableFinal[k2] = utf8.char(k2)
+            end
+        end
+    end
+
     tbl_hlist_nodes = {}
     tbl_vlist_nodes = {}
     for hlistNode in node.traverse(hboxes_stack) do

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex.sty	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex.sty	2021-01-27 22:06:08 UTC (rev 57539)
@@ -12,7 +12,7 @@
 %% version 1.3c or higher (your choice). The latest version of
 %% this license is at: http://www.latex-project.org/lppl.txt
 %% 
-\ProvidesExplPackage {texnegar-luatex} {2020-08-30} {0.1b} { Full implementation of kashida feature in xetex and luatex }
+\ProvidesExplPackage {texnegar-luatex} {2021-01-27} {0.1c} { Full implementation of kashida feature in xetex and luatex }
 
 \tex_input:D { texnegar-ini.tex }
 

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex-kashida.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex-kashida.tex	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex-kashida.tex	2021-01-27 22:06:08 UTC (rev 57539)
@@ -12,7 +12,7 @@
 %% version 1.3c or higher (your choice). The latest version of
 %% this license is at: http://www.latex-project.org/lppl.txt
 %% 
-\ProvidesExplFile {texnegar-xetex-kashida.tex} {2020-08-30} {0.1b} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\ProvidesExplFile {texnegar-xetex-kashida.tex} {2021-01-27} {0.1c} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
 
 \newXeTeXintercharclass \c_texnegar_d_charclass % dual-joiner class
 \newXeTeXintercharclass \c_texnegar_l_charclass % lam

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex.sty	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex.sty	2021-01-27 22:06:08 UTC (rev 57539)
@@ -13,7 +13,7 @@
 %% this license is at: http://www.latex-project.org/lppl.txt
 %% 
 \RequirePackage{zref-savepos}[2020-03-03]
-\ProvidesExplPackage {texnegar-xetex} {2020-08-30} {0.1b} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\ProvidesExplPackage {texnegar-xetex} {2021-01-27} {0.1c} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
 
 \tex_input:D { texnegar-ini.tex }
 

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar.lua	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar.lua	2021-01-27 22:06:08 UTC (rev 57539)
@@ -6,7 +6,7 @@
 --
 -- texnegar.dtx  (with options: `texnegar-lua')
 --
--- Copyright (C) 2020 Hossein Movahhedian
+-- Copyright (C) 2020-2021 Hossein Movahhedian
 --
 -- It may be distributed and/or modified under the LaTeX Project Public License,
 -- version 1.3c or higher (your choice). The latest version of
@@ -16,8 +16,8 @@
 -- local texnegar    = texnegar
 -- texnegar.module   = {
 --     name          = "texnegar",
---     version       = "0.1b",
---     date          = "2020-08-30",
+--     version       = "0.1c",
+--     date          = "2021-01-27",
 --     description   = "Full implementation of kashida feature in XeLaTex and LuaLaTeX",
 --     author        = "Hossein Movahhedian",
 --     copyright     = "Hossein Movahhedian",
@@ -30,7 +30,112 @@
 -- texnegar.warning = warn or (function (s) luatexbase.module_warning("texnegar", s) end)
 -- texnegar.error   = err  or (function (s) luatexbase.module_error("texnegar", s)   end)
 
+local debug_getinfo = debug.getinfo
+local string_format = string.format
+
+function TableLength(t)
+    local i = 0
+    for _ in pairs(t) do
+        i = i + 1
+    end
+    return i
+end
+
 tex.enableprimitives('',tex.extraprimitives ())
+
+local range_tble = {
+    [1536] = 1791,
+    [1872] = 1919,
+    [2208] = 2274,
+    [8204] = 8297,
+    [64336] = 65023,
+    [65136] = 65279,
+    [126464] = 126719,
+    [983040] = 1048575
+  }
+
+local tbl_fonts_used = { }
+local tbl_fonts_chars = { }
+local tbl_fonts_chars_init = { }
+local tbl_fonts_chars_medi = { }
+local tbl_fonts_chars_fina = { }
+
+local pattern_list = {
+  ".*%.(ini)t?$",  ".*%.(ini)t?%..*",
+  ".*%.(med)i?$",  ".*%.(med)i?%..*",
+  ".*%.(fin)a?$",  ".*%.(fin)a?%..*",
+
+  ".*_(ini)t?$",    ".*_(ini)t?_.*",
+  ".*_(med)i?$",    ".*_(med)i?_.*",
+  ".*_(fin)a?$",    ".*_(fin)a?_.*",
+
+  ".*_(AltIni)t?[0-9]?$",    ".*_(AltIni)t?[0-9]?_.*",
+  ".*_(AltMed)i?[0-9]?$",    ".*_(AltMed)i?[0-9]?_.*",
+  ".*_(AltFin)a?[0-9]?$",    ".*_(AltFin)a?[0-9]?_.*",
+}
+
+function GetFontsChars()
+    local funcName    = debug_getinfo(1).name
+    local funcNparams = debug_getinfo(1).nparams
+
+    for f_num = 1, font.max() do
+        local f_tmp = font.fonts[f_num]
+        if  f_tmp then
+            local f_tmp_fontname = f_tmp.fontname
+            if  f_tmp_fontname then
+                local f_id_tmp       = font.getfont(f_num)
+                local f_fontname_tmp = f_id_tmp.fontname
+                local f_filename_tmp = f_id_tmp.filename
+                if  not tbl_fonts_used[f_fontname_tmp] then
+                    tbl_fonts_used[f_fontname_tmp] = {f_filename_tmp, f_id_tmp}
+                end
+            end
+        end
+    end
+
+    for f_fontname, v in pairs(tbl_fonts_used) do
+        f_filename = v[1]
+        f_id = v[2]
+        if  not tbl_fonts_chars[f_fontname] then
+            tbl_fonts_chars[f_fontname] = { }
+            tbl_fonts_chars_init[f_fontname] = { }
+            tbl_fonts_chars_medi[f_fontname] = { }
+            tbl_fonts_chars_fina[f_fontname] = { }
+            local f = fontloader.open(f_filename)
+            local char_name
+            local char_unicode
+            local char_class
+            for k, v in pairs(range_tble) do
+                for glyph_idx = k, v do
+                    if  f_id.characters[glyph_idx] then
+                        char_name    = f.glyphs[f_id.characters[glyph_idx].index].name
+                        char_unicode = f.glyphs[f_id.characters[glyph_idx].index].unicode
+                        char_class   = f.glyphs[f_id.characters[glyph_idx].index].class
+                        if  not tbl_fonts_chars[f_fontname][glyph_idx] then
+                            if  string.match(f_fontname, "^(Amiri).*") == "Amiri" and char_name == 'uni0640.long1' then
+                                current_kashida_unicode = glyph_idx
+                            end
+                            tbl_fonts_chars[f_fontname][glyph_idx] = {char_name, char_unicode, char_class}
+                            for _, pattern in ipairs( pattern_list ) do
+                                local pos_alt = string.match(char_name, pattern)
+                                if  pos_alt == 'ini' or pos_alt == 'AltIni' then
+                                    tbl_fonts_chars_init[f_fontname][glyph_idx] = {char_name, char_unicode, char_class}
+                                elseif pos_alt == 'med' or pos_alt == 'AltMed' then
+                                    tbl_fonts_chars_medi[f_fontname][glyph_idx] = {char_name, char_unicode, char_class}
+                                elseif pos_alt == 'fin' or pos_alt == 'AltFin' then
+                                    tbl_fonts_chars_fina[f_fontname][glyph_idx] = {char_name, char_unicode, char_class}
+                                end
+                            end
+                        end
+                    end
+                end
+            end
+            fontloader.close(f)
+        end
+    end
+    return tbl_fonts_used, tbl_fonts_chars, tbl_fonts_chars_init, tbl_fonts_chars_medi, tbl_fonts_chars_fina
+end
+
 dofile(kpse.find_file("texnegar-ini.lua"))
 --
 --

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar.sty	2021-01-27 22:05:47 UTC (rev 57538)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar.sty	2021-01-27 22:06:08 UTC (rev 57539)
@@ -15,9 +15,14 @@
 \RequirePackage{xparse}
 \RequirePackage{l3keys2e}
 \RequirePackage{graphicx}[2019-11-30]
+\RequirePackage{array}[2019-10-01]
 \RequirePackage[dvipsnames,svgnames,x11names]{xcolor}[2016/05/11]
-\ProvidesExplPackage {texnegar} {2020-08-30} {0.1b} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\RequirePackage{fontspec}[2020/02/21]
+\RequirePackage{newverbs}[2010/09/02]
+\RequirePackage{environ}[2014/05/04]
 
+\ProvidesExplPackage {texnegar} {2021-01-27} {0.1c} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+
 \sys_if_engine_luatex:T
   {
     \RequirePackageWithOptions{texnegar-luatex}



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