• R/O
  • HTTP
  • SSH
  • HTTPS

luatexja: コミット

ソースコードの管理場所


コミットメタ情報

リビジョンede084c8402fec8e508616b466cde1b7d9597f52 (tree)
日時2020-01-13 13:17:14
作者Hironori Kitagawa <h_kitagawa2001@yaho...>
コミッターHironori Kitagawa

ログメッセージ

lltjp-fontspec: adapt fontspec 2.7e, and removed codes for <2.7c

変更サマリ

差分

--- a/README
+++ b/README
@@ -1,6 +1,6 @@
11 The LuaTeX-ja Package $VER$
22 --------------------------------
3-Copyright (c) 2011--2019 The LuaTeX-ja project
3+Copyright (c) 2011--2020 The LuaTeX-ja project
44 License: modified BSD (see COPYING)
55
66 LuaTeX-ja is a macro package for typesetting Japanese documents with LuaTeX.
--- a/src/patches/lltjdefs.sty
+++ b/src/patches/lltjdefs.sty
@@ -32,7 +32,13 @@
3232 \newcommand\kanjiencodingdefault{JY3}
3333 \newcommand\kanjifamilydefault{\mcdefault}
3434 \newcommand\kanjiseriesdefault{\mddefault}
35-\newcommand\kanjishapedefault{\updefault}
35+\ifdefined\shapedefault
36+ %% LaTeX 2020-02-02
37+ \newcommand\kanjishapedefault{\shapedefault}
38+\else
39+ %% LaTeX 2019-10-01
40+ \newcommand\kanjishapedefault{\updefault}
41+\fi
3642
3743 \DeclareKanjiFamily{JY3}{mc}{}
3844 \DeclareFontShape{JY3}{mc}{m}{n}{<-> s*[\ifdefined\Cjascale\Cjascale\else 0.962216\fi] \ltj@stdmcfont:jfm=\ltj@stdyokojfm}{}
@@ -93,7 +99,7 @@
9399 \def\@ltj@hook@family#1#2{ % #1: csname #2: contents
94100 \ifcsname @#1hook\endcsname % LaTeX 2020-02-02
95101 \csappto{@#1hook}{#2}%
96- \else
102+ \else % LaTeX 2019-10-01
97103 \ifcsname #1 \endcsname
98104 \expandafter\patchcmd\csname #1 \endcsname{\selectfont}{#2\selectfont}{}{}%
99105 \else
--- a/src/patches/lltjp-fontspec.sty
+++ b/src/patches/lltjp-fontspec.sty
@@ -1,5 +1,5 @@
11 %
2-% lltjp-fontspec.sty 2019-10-21
2+% lltjp-fontspec.sty 2020-01-13
33 %
44
55 \NeedsTeXFormat{LaTeX2e}
@@ -7,13 +7,31 @@
77 \RequirePackage{fontspec}
88 \ExplSyntaxOn
99
10-% <= v2.6g uses \l__fontspec_nfss_enc_tl instead of \g__fontspec_nfss_enc_tl
11-\ifdefined \g__fontspec_nfss_enc_tl \else
12- \def \g__fontspec_nfss_enc_tl { \l__fontspec_nfss_enc_tl }
13-\fi
14-
1510 %%%%%%%% fontspec v2.5c overwrites \rmfamily etc. in \setmainfont
16-\@ifpackagelater{fontspec}{2019/10/19}{ %% 2.7d or later
11+\@ifpackagelater{fontspec}{2020/01/09}{ %% 2.7e or later
12+ \tl_replace_all:cnn { rmfamily~ } { \fontfamily }{ \romanfamily }
13+ \tl_replace_all:cnn { sffamily~ } { \fontfamily }{ \romanfamily }
14+ \tl_replace_all:cnn { ttfamily~ } { \fontfamily }{ \romanfamily }
15+ \typeout{LATEX~ 2019-10-01!}
16+ \cs_if_exist:NF \@rmfamilyhook {
17+ \tl_replace_all:cnn { rmfamily~ } { \selectfont } {
18+ \if@ltj@match@family
19+ \prepare@family@series@update@kanji{mc}\mcdefault
20+ \fi\selectfont
21+ }
22+ \tl_replace_all:cnn { sffamily~ } { \selectfont } {
23+ \if@ltj@match@family
24+ \prepare@family@series@update@kanji{gt}\gtdefault
25+ \fi\selectfont
26+ }
27+ \tl_replace_all:cnn { ttfamily~ } { \selectfont } {
28+ \if@ltj@match@family
29+ \prepare@family@series@update@kanji{jtt}\jttdefault
30+ \fi\selectfont
31+ }
32+ }
33+%% end of 2.7e (or later)
34+}{\@ifpackagelater{fontspec}{2019/10/19}{ %% 2.7d
1735 \cs_set:Nn \__fontspec_main_setmainfont:nn
1836 {
1937 \fontspec_set_family:Nnn \l__fontspec_rmfamily_family_tl {#1} {#2}
@@ -71,7 +89,8 @@
7189 \__fontspec_setmonofont_hook:nn {#1} {#2}
7290 \normalfont
7391 }
74-}{\@ifpackagelater{fontspec}{2018/07/29}{ %% 2.6h <= and <= 2.7c
92+%% end of 2.7d
93+}{%% 2.7c
7594 \cs_set:Nn \__fontspec_main_setmainfont:nn
7695 {
7796 \fontspec_set_family:Nnn \l__fontspec_rmfamily_family_tl {#1} {#2}
@@ -129,58 +148,7 @@
129148 \__fontspec_setmonofont_hook:nn {#1} {#2}
130149 \normalfont
131150 }
132-}{ %% <= 2.6g
133-\DeclareDocumentCommand \setmainfont { O{} m O{} }
134- {
135- \fontspec_set_family:Nnn \g__fontspec_rmfamily_family {#1,#3} {#2}
136- \tl_set_eq:NN \rmdefault \g__fontspec_rmfamily_family
137- \use:x { \exp_not:n { \DeclareRobustCommand \rmfamily }
138- {
139- \exp_not:N \fontencoding { \g__fontspec_nfss_enc_tl }
140- \exp_not:N \fontfamily { \g__fontspec_rmfamily_family }
141- \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\mcdefault\exp_not:N\fi%%%
142- \exp_not:N \selectfont
143- }
144- }
145- \str_if_eq:eeT {\familydefault} {\rmdefault}
146- { \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
147- \normalfont
148- \ignorespaces
149- }
150-\DeclareDocumentCommand \setsansfont { O{} m O{} }
151- {
152- \fontspec_set_family:Nnn \g__fontspec_sffamily_family {#1,#3} {#2}
153- \tl_set_eq:NN \sfdefault \g__fontspec_sffamily_family
154- \use:x { \exp_not:n { \DeclareRobustCommand \sffamily }
155- {
156- \exp_not:N \fontencoding { \g__fontspec_nfss_enc_tl }
157- \exp_not:N \fontfamily { \g__fontspec_sffamily_family }
158- \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\gtdefault\exp_not:N\fi%%%
159- \exp_not:N \selectfont
160- }
161- }
162- \str_if_eq:eeT {\familydefault} {\sfdefault}
163- { \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
164- \normalfont
165- \ignorespaces
166- }
167-\DeclareDocumentCommand \setmonofont { O{} m O{} }
168- {
169- \fontspec_set_family:Nnn \g__fontspec_ttfamily_family {#1,#3} {#2}
170- \tl_set_eq:NN \ttdefault \g__fontspec_ttfamily_family
171- \use:x { \exp_not:n { \DeclareRobustCommand \ttfamily }
172- {
173- \exp_not:N \fontencoding { \g__fontspec_nfss_enc_tl }
174- \exp_not:N \fontfamily { \g__fontspec_ttfamily_family }
175- \exp_not:N\if@ltj@match@family\exp_not:N\kanjifamily\exp_not:N\jttdefault\exp_not:N\fi%%%
176- \exp_not:N \selectfont
177- }
178- }
179- \str_if_eq:eeT {\familydefault} {\ttdefault}
180- { \tl_set_eq:NN \encodingdefault \g__fontspec_nfss_enc_tl }
181- \normalfont
182- \ignorespaces
183- }
151+%% end of 2.7d
184152 }}
185153
186154 \cs_set:Nn \fontspec_visible_space:
@@ -190,19 +158,6 @@
190158 { \fontspec_visible_space_fallback: }
191159 }
192160
193-\AtBeginDocument{
194- \cs_if_exist:NF \verbvisiblespace {
195- % >= LaTeX2e <2018-12-01> does not need the following patch
196- \def\verb
197- {
198- \relax\ifmmode\hbox\else\leavevmode\fi % same as lltjcore
199- \bgroup
200- \verb@eol@error \let\do\@makeother \dospecials
201- \verbatim@font\@noligs
202- \@ifstar\__fontspecsverb\@verb
203- }
204- }
205-}
206161 \cs_set:Npn \emshape { \gtfamily \itshape }
207162 \cs_set:Npn \eminnershape { \mcfamily \upshape }
208163
旧リポジトリブラウザで表示