blob: 22209731d32d06019d49fd14e085983b61430fcc (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
%
% lltjp-fontspec-immediate.sty
%
\NeedsTeXFormat{LaTeX2e}
%%% \ProvidesPackage{lltjp-fontspec-immediate}[2017/08/07 Patch to fontspec for LuaTeX-ja]
\RequirePackage{fontspec,luatexja}
\ExplSyntaxOn
\@ifpackagelater{fontspec}{2017/01/01}{
%%%%%%%% fontspec v2.5c overwrites \rmfamily etc. in \setmainfont
\DeclareDocumentCommand \setmainfont { O{} m O{} }
{
\fontspec_set_family:Nnn \g__fontspec_rmfamily_family {#1,#3} {#2}
\tl_set_eq:NN \rmdefault \g__fontspec_rmfamily_family
\use:x { \exp_not:n { \DeclareRobustCommand \rmfamily }
{
\exp_not:N \fontencoding { \l__fontspec_nfss_enc_tl }
\exp_not:N \fontfamily { \g__fontspec_rmfamily_family }
\exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\mcdefault\exp_not:N\fi%%%
\exp_not:N \selectfont
}
}
\str_if_eq_x:nnT {\familydefault} {\rmdefault}
{ \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
\normalfont
\ignorespaces
}
\DeclareDocumentCommand \setsansfont { O{} m O{} }
{
\fontspec_set_family:Nnn \g__fontspec_sffamily_family {#1,#3} {#2}
\tl_set_eq:NN \sfdefault \g__fontspec_sffamily_family
\use:x { \exp_not:n { \DeclareRobustCommand \sffamily }
{
\exp_not:N \fontencoding { \l__fontspec_nfss_enc_tl }
\exp_not:N \fontfamily { \g__fontspec_sffamily_family }
\exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\gtdefault\exp_not:N\fi%%%
\exp_not:N \selectfont
}
}
\str_if_eq_x:nnT {\familydefault} {\sfdefault}
{ \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
\normalfont
\ignorespaces
}
\DeclareDocumentCommand \setmonofont { O{} m O{} }
{
\fontspec_set_family:Nnn \g__fontspec_ttfamily_family {#1,#3} {#2}
\tl_set_eq:NN \ttdefault \g__fontspec_ttfamily_family
\use:x { \exp_not:n { \DeclareRobustCommand \ttfamily }
{
\exp_not:N \fontencoding { \l__fontspec_nfss_enc_tl }
\exp_not:N \fontfamily { \g__fontspec_ttfamily_family }
\exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\jttdefault\exp_not:N\fi%%%
\exp_not:N \selectfont
}
}
\str_if_eq_x:nnT {\familydefault} {\ttdefault}
{ \tl_set_eq:NN \encodingdefault \l__fontspec_nfss_enc_tl }
\normalfont
\ignorespaces
}
}
\ExplSyntaxOff
\expandafter\patchcmd\csname TU\string\textasteriskcentered\endcsname{\char}{\ltjalchar}{}{}
\endinput
|