%
% lltjp-fontspec.sty
%

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{lltjp-fontspec}[2016/10/12 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
\endinput
