diff options
author | Karl Berry <karl@freefriends.org> | 2018-01-04 23:46:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-01-04 23:46:17 +0000 |
commit | 07dd0643536047c519668c16337eab65a182f3e4 (patch) | |
tree | 86f30cd189d90a1a14e1a4dcc20b71c5e8f59691 /Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def | |
parent | 196751def71387e14be5101a1953d0add736328e (diff) |
xepersian (4jan18)
git-svn-id: svn://tug.org/texlive/trunk@46218 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def b/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def index 8b95e1f74db..443b502f090 100644 --- a/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def +++ b/Master/texmf-dist/tex/xelatex/xepersian/kashida-xepersian.def @@ -17,7 +17,7 @@ %% by Vafa Khalighi. %% %% -%% \CheckSum{10452} +%% \CheckSum{10521} %% \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 @@ -34,17 +34,20 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} %% -\ProvidesFile{kashida-xepersian.def}[2018/01/03 v0.6 implementation of Kashida for xepersian package] +\ProvidesFile{kashida-xepersian.def}[2018/01/04 v0.6 implementation of Kashida for xepersian package] +\chardef\xepersian@zwj="200D % zero-width joiner \chardef\xepersian@kashidachar="0640 % kashida \chardef\xepersian@D=10 % dual-joiner class \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 -\def\xepersian@kashida{\if@Kashida@on\xepersian@kashidachar\nobreak% - \leaders\hrule height \XeTeXglyphbounds\tw@ \the\XeTeXcharglyph\xepersian@kashidachar depth \XeTeXglyphbounds\f@ur \the\XeTeXcharglyph\xepersian@kashidachar \hskip0pt plus 0.5em \xepersian@kashidachar\relax\fi} +\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} \def\setclass#1#2{\def\theclass{#1}\def\charlist{#2}% \expandafter\dosetclass\charlist,\end} @@ -60,22 +63,32 @@ \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,0647,0649,064A} +\setclass \xepersian@D {0640,0641,0642,0643,0645,0646,0649,064A} +\XeTeXcharclass "0647 \xepersian@H \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 %% |