summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty
blob: 4db2ffe8a4ce52ada2b74d634e10ff61fab43917 (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
%
% lltjp-fontspec.sty
%

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{lltjp-fontspec}[2017/08/07 Patch to fontspec for LuaTeX-ja]

\RequirePackage{fontspec,luatexja}
\ExplSyntaxOn

\@ifpackagelater{fontspec}{2017/01/01}{
  \cs_set:Nn \fontspec_visible_space:
   {
   \__fontspec_primitive_font_glyph_if_exist:NnTF \font {"2423}
     { \ltjalchar"2423\scan_stop: }
     { \fontspec_visible_space_fallback: }
   }
}{
  \cs_set:Nn \fontspec_visible_space:
   {
   \font_glyph_if_exist:NnTF \font {"2423}
     { \ltjalchar"2423\scan_stop: }
     { \fontspec_visible_space_fallback: }
   }
}
\def\verb
 {
  \relax\ifmmode\hbox\else\leavevmode\fi % same as lltjcore
  \bgroup
    \verb@eol@error \let\do\@makeother \dospecials
    \verbatim@font\@noligs
    \@ifstar\__fontspecsverb\@verb
 }


%%%%%%%% shapes in \em
\cs_set:Npn \emshape { \gtfamily \itshape }
\cs_set:Npn \eminnershape { \mcfamily \upshape }

\ExplSyntaxOff
\expandafter\patchcmd\csname TU\string\textasteriskcentered\endcsname{\char}{\ltjalchar}{}{}
\endinput