summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def')
-rw-r--r--Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def49
1 files changed, 29 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def
index 8dd2c9b5b6b..3a9d6112485 100644
--- a/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def
+++ b/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def
@@ -7,21 +7,35 @@
%% xepersian.dtx (with options: `table,kashida-xepersian.def')
%%
%% __________________________________________________
-%%
-%% Copyright (c) Vafa Khalighi 2007-2019
-%% bidi-tex GitHub Organisation 2018-2020
-%%
-%%
+%% Copyright (c) 2008--2020 Vafa Khalighi
+%% Copyright (c) 2018--2020 bidi-tex GitHub Organization
%%
%% It may be distributed and/or modified under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of
%% this license is at: http://www.latex-project.org/lppl.txt
%%
%% This work is “author-maintained” (as per LPPL maintenance status)
-%% by bidi-tex GitHub Organisation.
+%% by Vafa Khalighi.
%%
%%
-\ProvidesFile{kashida-xepersian.def}[2018/01/04 v0.6 implementation of Kashida for xepersian package]
+%% \CheckSum{10968}
+%% \CharacterTable
+%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+%%
+\ProvidesFile{kashida-xepersian.def}[2020/05/14 v0.7 implementation of Kashida for xepersian package]
\chardef\xepersian@zwj="200D % zero-width joiner
\chardef\xepersian@kashidachar="0640 % kashida
@@ -29,12 +43,16 @@
\chardef\xepersian@L=11 % lam
\chardef\xepersian@R=12 % right-joiner
\chardef\xepersian@A=13 % alef
-\chardef\xepersian@H=14 % heh
\chardef\xepersian@V=4096 % vowel or other combining mark (to be ignored)
\newif\if@Kashida@on
-\newif\if@Kashida@XB@fix
\def\xepersian@kashida{\if@Kashida@on\xepersian@zwj\nobreak%
- \leaders\hrule height \XeTeXglyphbounds\tw@ \the\XeTeXcharglyph\xepersian@kashidachar depth \XeTeXglyphbounds\f@ur \the\XeTeXcharglyph\xepersian@kashidachar \hskip0pt plus 0.5em \xepersian@zwj\fi}
+ \leaders\hrule height \XeTeXglyphbounds\tw@ \the\XeTeXcharglyph\xepersian@kashidachar depth \XeTeXglyphbounds\f@ur \the\XeTeXcharglyph\xepersian@kashidachar \hskip0pt plus
+ \dimexpr \fontcharwd\font\xepersian@kashidachar -
+ \XeTeXglyphbounds\@ne
+ \the\XeTeXcharglyph\xepersian@kashidachar -
+ \XeTeXglyphbounds\thr@@
+ \the\XeTeXcharglyph\xepersian@kashidachar \relax
+\xepersian@zwj\fi}
\def\setclass#1#2{\def\theclass{#1}\def\charlist{#2}%
\expandafter\dosetclass\charlist,\end}
@@ -50,32 +68,23 @@
\setclass \xepersian@R {0624,0629,062F,0630,0631,0632,0648,0698}
\setclass \xepersian@D {0626,0628,062A,062B,062C,062D,062E}
\setclass \xepersian@D {0633,0634,0635,0636,0637,0638,0639,063A}
-\setclass \xepersian@D {0640,0641,0642,0643,0645,0646,0649,064A}
-\setclass \xepersian@H {0647}
+\setclass \xepersian@D {0640,0641,0642,0643,0645,0646,0647,0649,064A}
\setclass \xepersian@D {067E,0686,06A9,06AF,06CC}
\setclass \xepersian@L {0644}
\setclass \xepersian@V {064B,064C,064D,064E,064F,0650,0651,0652}
\XeTeXinterchartoks \xepersian@D \xepersian@D = {\xepersian@kashida}
-\XeTeXinterchartoks \xepersian@H \xepersian@D = {\if@Kashida@XB@fix\else\xepersian@kashida\fi}
-\XeTeXinterchartoks \xepersian@D \xepersian@H = {\xepersian@kashida}
\XeTeXinterchartoks \xepersian@L \xepersian@D = {\xepersian@kashida}
\XeTeXinterchartoks \xepersian@D \xepersian@L = {\xepersian@kashida}
-\XeTeXinterchartoks \xepersian@L \xepersian@H = {\xepersian@kashida}
-\XeTeXinterchartoks \xepersian@H \xepersian@L = {\if@Kashida@XB@fix\else\xepersian@kashida\fi}
\XeTeXinterchartoks \xepersian@L \xepersian@L = {\xepersian@kashida}
\XeTeXinterchartoks \xepersian@D \xepersian@R = {\xepersian@kashida}
-\XeTeXinterchartoks \xepersian@H \xepersian@R = {\if@Kashida@XB@fix\else\xepersian@kashida\fi}
\XeTeXinterchartoks \xepersian@D \xepersian@A = {\xepersian@kashida}
-\XeTeXinterchartoks \xepersian@H \xepersian@A = {\if@Kashida@XB@fix\else\xepersian@kashida\fi}
\XeTeXinterchartoks \xepersian@L \xepersian@R = {\xepersian@kashida}
\XeTeXinterchartoks \xepersian@L \xepersian@A = {}
\newcommand{\KashidaOn}{\@Kashida@ontrue}
\newcommand{\KashidaOff}{\@Kashida@onfalse}
-\newcommand{\KashidaXBFixOn}{\@Kashida@XB@fixtrue}
-\newcommand{\KashidaXBFixOff}{\@Kashida@XB@fixfalse}
\KashidaOn
\endinput
%%