summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex.sty
blob: d7097e9e649ee0f3d4374b16a0f6eee1d8714b94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
%%
%% This is file `texnegar-luatex.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% texnegar.dtx  (with options: `texnegar-luatex-sty')
%% 
%% Copyright (C) 2020 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
%% 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 }

\tex_input:D { texnegar-ini.tex }

\bool_if:NT \l_texnegar_kashida_fix_bool
  {
    \if_int_compare:w \luatexversion < \c_texnegar_luatexversionmajormin_int\c_texnegar_luatexversionminormin_int
        \msg_error:nnxxx { texnegar } { luatex-version-is-too-old } { !!!! } { \c_texnegar_luatexversionmajormin_int } { \c_texnegar_luatexversionminormin_int }
    \fi:

    \hbox_set:Nn \l_texnegar_k_box { \resizebox{5000sp}{\height}{-} }

    \hbox_set:Nn \l_texnegar_ksh_box { \char\lua_now:n { tex.sprint(0, font.getfont(font.current()).resources.unicodes[token.scan_string()]) } hyphen }

    \directlua{dofile(kpse.find_file("texnegar.lua"))}
  }

\bool_if:NT \l_texnegar_kashida_fix_bool
  {
    \tex_input:D { texnegar-common-kashida.tex }

    \AtBeginDocument
      {
        \KashidaOn
      }
  }

 \endinput
%% 
%%
%% End of file `texnegar-luatex.sty'.