summaryrefslogtreecommitdiff
path: root/macros/unicodetex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-02-01 03:00:47 +0000
committerNorbert Preining <norbert@preining.info>2021-02-01 03:00:47 +0000
commit87c74b3292e1c3efc4427ae0536a1d30a0dc8e4b (patch)
tree219447f0cb875a4889a8cac2bea6deb012b7ca7b /macros/unicodetex
parent8eab566745f1c61319c17e6a1aeea0f18bcfc34c (diff)
CTAN sync 202102010300
Diffstat (limited to 'macros/unicodetex')
-rw-r--r--macros/unicodetex/latex/texnegar/INSTALL.txt26
-rw-r--r--macros/unicodetex/latex/texnegar/doc-ligature-texnegar.pdfbin13132 -> 13141 bytes
-rw-r--r--macros/unicodetex/latex/texnegar/doc-ligature-xep.pdfbin10111 -> 10116 bytes
-rw-r--r--macros/unicodetex/latex/texnegar/doc-samples-glyph.pdfbin63437 -> 63436 bytes
-rw-r--r--macros/unicodetex/latex/texnegar/doc-samples-hrule.pdfbin62969 -> 62969 bytes
-rw-r--r--macros/unicodetex/latex/texnegar/doc-samples-xep.pdfbin65546 -> 65544 bytes
-rw-r--r--macros/unicodetex/latex/texnegar/texnegar-doc.ltx32
-rw-r--r--macros/unicodetex/latex/texnegar/texnegar-doc.pdfbin2868138 -> 2873970 bytes
-rw-r--r--macros/unicodetex/latex/texnegar/texnegar-luatex-glyph.pdfbin878555 -> 878555 bytes
-rw-r--r--macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-glyph.pdfbin278471 -> 278471 bytes
-rw-r--r--macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-hrule.pdfbin169438 -> 169438 bytes
-rw-r--r--macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-glyph.pdfbin157991 -> 157990 bytes
-rw-r--r--macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.pdfbin212563 -> 212553 bytes
-rw-r--r--macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.pdfbin156643 -> 156635 bytes
-rw-r--r--macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-glyph.pdfbin156631 -> 156636 bytes
-rw-r--r--macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.pdfbin194659 -> 194661 bytes
-rw-r--r--macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.pdfbin155935 -> 155945 bytes
-rw-r--r--macros/unicodetex/latex/texnegar/texnegar.dtx116
-rw-r--r--macros/unicodetex/latex/texnegar/texnegar.ins4
-rw-r--r--macros/unicodetex/latex/texnegar/texnegar.pdfbin564734 -> 563702 bytes
-rw-r--r--macros/unicodetex/latex/texnegar/xepersian-XB.pdfbin106692 -> 106691 bytes
21 files changed, 113 insertions, 65 deletions
diff --git a/macros/unicodetex/latex/texnegar/INSTALL.txt b/macros/unicodetex/latex/texnegar/INSTALL.txt
index 1121a14459..30a096fb97 100644
--- a/macros/unicodetex/latex/texnegar/INSTALL.txt
+++ b/macros/unicodetex/latex/texnegar/INSTALL.txt
@@ -1,7 +1,7 @@
texnegar -- INSTALL
======================
- Source: texnegar.dtx (2021-01-27 v0.1c)
+ Source: texnegar.dtx (2021-01-31 v0.1d)
Author: Hossein Movahhedian
Info: filecontents + macro + verbatim
License: LPPL 1.3c
@@ -9,23 +9,23 @@
<dma8hm1334 AT gmail DOT com>
- To extract the package and at the same time produce the
- documentation, execute: xelatex thrice on texnegar.dtx.
+ documentation, execute: lualatex or xelatex thrice on texnegar.dtx.
Files should then be moved to appropriate locations.
--- *.dtx -> TEXMF/source/xelatex/texnegar/
--- *.ins -> TEXMF/source/xelatex/texnegar/
+-- *.dtx -> TEXMF/source/latex/texnegar/
+-- *.ins -> TEXMF/source/latex/texnegar/
--- *.sty -> TEXMF/tex/xelatex/texnegar/
--- *.lua -> TEXMF/tex/xelatex/texnegar/
--- texnegar-ini.tex -> TEXMF/tex/xelatex/texnegar/
--- texnegar-xetex-kashida.tex -> TEXMF/tex/xelatex/texnegar/
--- texnegar-common-kashida.tex -> TEXMF/tex/xelatex/texnegar/
+-- *.sty -> TEXMF/tex/latex/texnegar/
+-- *.lua -> TEXMF/tex/latex/texnegar/
+-- texnegar-ini.tex -> TEXMF/tex/latex/texnegar/
+-- texnegar-xetex-kashida.tex -> TEXMF/tex/latex/texnegar/
+-- texnegar-common-kashida.tex -> TEXMF/tex/latex/texnegar/
--- *.pdf -> TEXMF/doc/xelatex/texnegar/
--- *.tex -> TEXMF/doc/xelatex/texnegar/
--- *.ltx -> TEXMF/doc/xelatex/texnegar/
--- *.txt -> TEXMF/doc/xelatex/texnegar/
+-- *.pdf -> TEXMF/doc/latex/texnegar/
+-- *.tex -> TEXMF/doc/latex/texnegar/
+-- *.ltx -> TEXMF/doc/latex/texnegar/
+-- *.txt -> TEXMF/doc/latex/texnegar/
Don't forget to run 'texconfig rehash' afterwards.
diff --git a/macros/unicodetex/latex/texnegar/doc-ligature-texnegar.pdf b/macros/unicodetex/latex/texnegar/doc-ligature-texnegar.pdf
index 55bb7c1087..1a2a98538c 100644
--- a/macros/unicodetex/latex/texnegar/doc-ligature-texnegar.pdf
+++ b/macros/unicodetex/latex/texnegar/doc-ligature-texnegar.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/texnegar/doc-ligature-xep.pdf b/macros/unicodetex/latex/texnegar/doc-ligature-xep.pdf
index 02c1be0ef2..abe4facd9e 100644
--- a/macros/unicodetex/latex/texnegar/doc-ligature-xep.pdf
+++ b/macros/unicodetex/latex/texnegar/doc-ligature-xep.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/texnegar/doc-samples-glyph.pdf b/macros/unicodetex/latex/texnegar/doc-samples-glyph.pdf
index a72a792eb9..9461731e02 100644
--- a/macros/unicodetex/latex/texnegar/doc-samples-glyph.pdf
+++ b/macros/unicodetex/latex/texnegar/doc-samples-glyph.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/texnegar/doc-samples-hrule.pdf b/macros/unicodetex/latex/texnegar/doc-samples-hrule.pdf
index 8e55b7dc26..25e9856e58 100644
--- a/macros/unicodetex/latex/texnegar/doc-samples-hrule.pdf
+++ b/macros/unicodetex/latex/texnegar/doc-samples-hrule.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/texnegar/doc-samples-xep.pdf b/macros/unicodetex/latex/texnegar/doc-samples-xep.pdf
index f613613547..e1dbc20a38 100644
--- a/macros/unicodetex/latex/texnegar/doc-samples-xep.pdf
+++ b/macros/unicodetex/latex/texnegar/doc-samples-xep.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/texnegar/texnegar-doc.ltx b/macros/unicodetex/latex/texnegar/texnegar-doc.ltx
index c740068a7d..6b38d66e34 100644
--- a/macros/unicodetex/latex/texnegar/texnegar-doc.ltx
+++ b/macros/unicodetex/latex/texnegar/texnegar-doc.ltx
@@ -1,7 +1,7 @@
%%
%% This is file `texnegar-doc.tex'
%%
-%% Copyright (c) Hossein Movahhedian 2020-2021
+%% 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,7 +63,7 @@
}
}
-\date{Released \quad 2021-01-27 \quad v0.1c}
+\date{Released \quad 2021-01-31 \quad v0.1d}
\definecolor{HMhighlightBlueI}{rgb}{0,0,1}
\definecolor{HMhighlightbgYellowII}{rgb}{1,1,1}
@@ -281,7 +281,7 @@ The options available in \TeXNegar{} are:
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).
+ for using \texttt{texnegar} as a general purpose Persian typesetter (including kashida implementation).
This is the default value.
\end{itemize}
@@ -389,6 +389,26 @@ The options available in \TeXNegar{} are:
\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{Kashidafontfamily}}: \\
+ that fixes the issue in \texttt{ArabLuaTeX} if one uses fonts other than \textsf{HM Series} and \textsf{Adobe Arab},
+ among those are fonts such as \textsf{Scheherazade}, \textsf{Scheherazade New}, and \textsf{Amiri}.
+ The value of this option, as returned by \hologo{LuaTeX}, is the family name of the font without spaces.
+ A few examples of these values and the corresponding fonts are:
+
+ \begin{longtable}{ll}
+ value & corresponding fonts \\
+ \hline
+ \texttt{AdobeArab} & \textsf{\small Adobe Arab Regular}, \\
+ & \textsf{\small Adobe Arab Bold}, \dots\unkern. \\
+ \texttt{Amiri} & \textsf{\small Amiri Regular, Amiri Bold}, \\
+ & \textsf{\small Amiri Slanted}, \dots\unkern. \\
+ \texttt{HMXKayhan} & \textsf{\small HM XKayhan Regular}, \\
+ & \textsf{\small HM XKayhan Bold}, \dots\unkern. \\
+ \texttt{ScheherazadeNew} & \textsf{\small Scheherazade New Regular}, \\
+ & \textsf{\small Scheherazade New Bold}, \dots\unkern. \\
+ \texttt{Scheherazade} & \textsf{\small Scheherazade}, \dots\unkern. \\
+ \end{longtable}
+
\item \indextermsub{LuaLaTeX-only Options}{\textbf{\hologo{LuaLaTeX}-only Options}}{\texttt{hboxrecursion}}: \\
which enables kashida justification inside horizontal boxes recursively.
@@ -509,6 +529,12 @@ I also would like to thank the developer teams of TeX's friends especially LaTeX
\item Fixed the problem with \texttt{Scheherazade} and \texttt{Amiri} fonts.
\end{Itemize}
+\SubSecItem{2021-01-31~v0.1d}
+\begin{Itemize}
+ \item Added the option \texttt{Kashidafontfamily} that fixes the issue in \texttt{ArabLuaTeX} if one uses
+ fonts other than \textsf{HM Series} and \textsf{Adobe Arab}.
+\end{Itemize}
+
\section*{To Do's}
To do
diff --git a/macros/unicodetex/latex/texnegar/texnegar-doc.pdf b/macros/unicodetex/latex/texnegar/texnegar-doc.pdf
index fe4771d0d2..75a809b26d 100644
--- a/macros/unicodetex/latex/texnegar/texnegar-doc.pdf
+++ b/macros/unicodetex/latex/texnegar/texnegar-doc.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/texnegar/texnegar-luatex-glyph.pdf b/macros/unicodetex/latex/texnegar/texnegar-luatex-glyph.pdf
index bfc142958c..38f55ce7ae 100644
--- a/macros/unicodetex/latex/texnegar/texnegar-luatex-glyph.pdf
+++ b/macros/unicodetex/latex/texnegar/texnegar-luatex-glyph.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-glyph.pdf b/macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-glyph.pdf
index 575bae99f9..d2175bb022 100644
--- a/macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-glyph.pdf
+++ b/macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-glyph.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-hrule.pdf b/macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-hrule.pdf
index 3d3a9a5b54..245750465a 100644
--- a/macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-hrule.pdf
+++ b/macros/unicodetex/latex/texnegar/texnegar-luatex-leaders-hrule.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-glyph.pdf b/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-glyph.pdf
index 585372d580..b27a5a2d23 100644
--- a/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-glyph.pdf
+++ b/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-glyph.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.pdf b/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.pdf
index b1162a6dc2..8ebdff53b3 100644
--- a/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.pdf
+++ b/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.pdf b/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.pdf
index 6124360681..e45da3f31f 100644
--- a/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.pdf
+++ b/macros/unicodetex/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-glyph.pdf b/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-glyph.pdf
index 72274f832a..16a3d0bac9 100644
--- a/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-glyph.pdf
+++ b/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-glyph.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.pdf b/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.pdf
index 5bac4724b5..b76e2e3e15 100644
--- a/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.pdf
+++ b/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.pdf b/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.pdf
index 84e262a2e4..db2648da2d 100644
--- a/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.pdf
+++ b/macros/unicodetex/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/texnegar/texnegar.dtx b/macros/unicodetex/latex/texnegar/texnegar.dtx
index 17e8e83e3d..40a5baef1c 100644
--- a/macros/unicodetex/latex/texnegar/texnegar.dtx
+++ b/macros/unicodetex/latex/texnegar/texnegar.dtx
@@ -101,7 +101,7 @@ make time to fix.
% }^^A
% }
%
-% \date{Released \quad 2021-01-27 \quad v0.1c}
+% \date{Released \quad 2021-01-31 \quad v0.1d}
%
% \maketitle
%
@@ -137,7 +137,7 @@ make time to fix.
\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 }
+\ProvidesExplPackage {texnegar} {2021-01-31} {0.1d} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
\sys_if_engine_luatex:T
{
@@ -165,7 +165,7 @@ make time to fix.
%
% \begin{macrocode}
%<*texnegar-luatex-sty>
-\ProvidesExplPackage {texnegar-luatex} {2021-01-27} {0.1c} { Full implementation of kashida feature in xetex and luatex }
+\ProvidesExplPackage {texnegar-luatex} {2021-01-31} {0.1d} { Full implementation of kashida feature in xetex and luatex }
\tex_input:D { texnegar-ini.tex }
@@ -201,7 +201,7 @@ make time to fix.
% \begin{macrocode}
%<*texnegar-xetex-sty>
\RequirePackage{zref-savepos}[2020-03-03]
-\ProvidesExplPackage {texnegar-xetex} {2021-01-27} {0.1c} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\ProvidesExplPackage {texnegar-xetex} {2021-01-31} {0.1d} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
\tex_input:D { texnegar-ini.tex }
@@ -218,7 +218,7 @@ make time to fix.
%
% \begin{macrocode}
%<*texnegar-ini-tex>
-\ProvidesExplFile {texnegar-ini.tex} {2021-01-27} {0.1c} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\ProvidesExplFile {texnegar-ini.tex} {2021-01-31} {0.1d} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
\def\TeXNegar{\TeX Negar}
@@ -278,6 +278,10 @@ make time to fix.
\bool_set_false:N \l_texnegar_kashida_fix_bool
+\bool_set_false:N \l_texnegar_kashida_fontfamily_bool
+\tl_new:N \l_texnegar_kashida_fontfamily_tl
+\tl_set:Nn \l_texnegar_kashida_fontfamily_tl { N/A }
+
\bool_set_false:N \l_texnegar_kashida_glyph_bool
\bool_set_false:N \l_texnegar_kashida_leaders_glyph_bool
\bool_set_false:N \l_texnegar_kashida_leaders_hrule_bool
@@ -409,6 +413,22 @@ make time to fix.
\keys_define:nn { texnegar }
{
+ Kashidafontfamily .code:n =
+ {
+ \tl_set:Nn \l_tmpa_tl { #1 }
+ \tl_case:Nn \l_tmpa_tl
+ {
+ \tl_if_empty:NTF \l_tmpa_tl
+ {
+ \bool_set_false:N \l_texnegar_kashida_fontfamily_bool
+ }
+ {
+ \bool_set_true:N \l_texnegar_kashida_fontfamily_bool
+ \tl_set:Nx \l_texnegar_kashida_fontfamily_tl { \l_tmpa_tl }
+ }
+ }
+ } ,
+
Minimal .code:n =
{
\tl_set:Nn \l_tmpa_tl { #1 }
@@ -643,7 +663,7 @@ make time to fix.
% \subsection{File: \texttt{texnegar-common-kashida.tex}}
% \begin{macrocode}
%<*texnegar-common-kashida-tex>
-\ProvidesExplFile {texnegar-common-kashida.tex} {2021-01-27} {0.1c} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\ProvidesExplFile {texnegar-common-kashida.tex} {2021-01-31} {0.1d} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
\bool_if:NT \l_texnegar_ligature_bool
{
@@ -720,7 +740,7 @@ make time to fix.
%
% \begin{macrocode}
%<*texnegar-xetex-kashida-tex>
-\ProvidesExplFile {texnegar-xetex-kashida.tex} {2021-01-27} {0.1c} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\ProvidesExplFile {texnegar-xetex-kashida.tex} {2021-01-31} {0.1d} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
\newXeTeXintercharclass \c_texnegar_d_charclass % dual-joiner class
\newXeTeXintercharclass \c_texnegar_l_charclass % lam
@@ -941,8 +961,8 @@ make time to fix.
-- local texnegar_char_table = texnegar_char_table
-- texnegar_char_table.module = {
-- name = "texnegar_char_table",
--- version = "0.1c",
--- date = "2021-01-27",
+-- version = "0.1d",
+-- date = "2021-01-31",
-- description = "Full implementation of kashida feature in XeLaTex and LuaLaTeX",
-- author = "Hossein Movahhedian",
-- copyright = "Hossein Movahhedian",
@@ -1166,8 +1186,8 @@ return peCharTableInitial, peCharTableMedial, peCharTableFinal
-- local texnegar = texnegar
-- texnegar.module = {
-- name = "texnegar",
--- version = "0.1c",
--- date = "2021-01-27",
+-- version = "0.1d",
+-- date = "2021-01-31",
-- description = "Full implementation of kashida feature in XeLaTex and LuaLaTeX",
-- author = "Hossein Movahhedian",
-- copyright = "Hossein Movahhedian",
@@ -1180,6 +1200,8 @@ return peCharTableInitial, peCharTableMedial, peCharTableFinal
-- 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 l_texnegar_kashida_fontfamily_bool = token.create("l_texnegar_kashida_fontfamily_bool")
+
local debug_getinfo = debug.getinfo
local string_format = string.format
@@ -1218,10 +1240,6 @@ local pattern_list = {
".*_(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()
@@ -1261,19 +1279,24 @@ function GetFontsChars()
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}
+
+ kashida_fontfamily = token.get_macro("l_texnegar_kashida_fontfamily_tl")
+ fontfamily_match = string.match(f_fontname, "^(" .. kashida_fontfamily .. ").*")
+ if fontfamily_match == kashida_fontfamily then
+ 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
@@ -1315,8 +1338,8 @@ dofile(kpse.find_file("texnegar-ini.lua"))
-- local texnegar_ini = texnegar_ini
-- texnegar_ini.module = {
-- name = "texnegar_ini",
--- version = "0.1c",
--- date = "2021-01-27",
+-- version = "0.1d",
+-- date = "2021-01-31",
-- description = "Full implementation of kashida feature in XeLaTex and LuaLaTeX",
-- author = "Hossein Movahhedian",
-- copyright = "Hossein Movahhedian",
@@ -1369,8 +1392,8 @@ dofile(kpse.find_file("texnegar-luatex-kashida.lua"))
-- local texnegar_luatex_kashida = texnegar_luatex_kashida
-- texnegar_luatex_kashida.module = {
-- name = "texnegar_luatex_kashida",
--- version = "0.1c",
--- date = "2021-01-27",
+-- version = "0.1d",
+-- date = "2021-01-31",
-- description = "Full implementation of kashida feature in XeLaTex and LuaLaTeX",
-- author = "Hossein Movahhedian",
-- copyright = "Hossein Movahhedian",
@@ -1471,6 +1494,7 @@ function GetGlyph(t_plb_line_glyph_node, t_tbl_line_fields, t_CharTableInitial,
local glyph_lang = t_plb_line_glyph_node.lang
local glyph_width = t_plb_line_glyph_node.width
local glyph_data = t_plb_line_glyph_node.data
+
if not (t_CharTableInitial[glyph_char] == nil) then
t_tbl_line_fields.joinerCharInitial = t_tbl_line_fields.joinerCharInitial + 1
t_plb_line_glyph_node.data = 1
@@ -1821,7 +1845,6 @@ function ProcessTableVlist(tmpvl_n)
local tmpvl_n_id = tmpvl_n.id
local tmpvl_n_subtype = tmpvl_n.subtype
- print(string_format(" %s: 00-0 tmpvl_n: id: %d, subtype: %d", funcName, tmpvl_n_id, tmpvl_n_subtype))
for vbNode in node.traverse(tmpvl_n) do
if vbNode.id == 1 and vbNode.subtype == 0 then
for tr_vbNode in node.traverse(vbNode.head) do
@@ -1844,28 +1867,27 @@ function PostLineBreakFilter(hboxes_stack, groupcode)
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)
+ local f_fontname
+
+ for f_fontname, v in pairs(tbl_fonts_used) do
+ for k1, v1 in pairs(tbl_fonts_chars_init[f_fontname]) do
+ if k1 and not peCharTableInitial[k1] then
+ peCharTableInitial[k1] = utf8.char(k1)
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)
+ for k1, v1 in pairs(tbl_fonts_chars_medi[f_fontname]) do
+ if k1 and not peCharTableMedial[k1] then
+ peCharTableMedial[k1] = utf8.char(k1)
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)
+ for k1, v1 in pairs(tbl_fonts_chars_fina[f_fontname]) do
+ if k1 and not peCharTableFinal[k1] then
+ peCharTableFinal[k1] = utf8.char(k1)
end
end
end
diff --git a/macros/unicodetex/latex/texnegar/texnegar.ins b/macros/unicodetex/latex/texnegar/texnegar.ins
index 6ed26bf948..a5b915ccf9 100644
--- a/macros/unicodetex/latex/texnegar/texnegar.ins
+++ b/macros/unicodetex/latex/texnegar/texnegar.ins
@@ -2,7 +2,7 @@
File: texnegar.ins
-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,7 +16,7 @@ this license is at: http://www.latex-project.org/lppl.txt
\preamble
-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
diff --git a/macros/unicodetex/latex/texnegar/texnegar.pdf b/macros/unicodetex/latex/texnegar/texnegar.pdf
index 834f5bee65..3abdf6da0b 100644
--- a/macros/unicodetex/latex/texnegar/texnegar.pdf
+++ b/macros/unicodetex/latex/texnegar/texnegar.pdf
Binary files differ
diff --git a/macros/unicodetex/latex/texnegar/xepersian-XB.pdf b/macros/unicodetex/latex/texnegar/xepersian-XB.pdf
index 6858bae735..18a3e065fa 100644
--- a/macros/unicodetex/latex/texnegar/xepersian-XB.pdf
+++ b/macros/unicodetex/latex/texnegar/xepersian-XB.pdf
Binary files differ