• R/O
  • HTTP
  • SSH
  • HTTPS

luatexja: コミット

ソースコードの管理場所


コミットメタ情報

リビジョン053a051fcaf1772071e024dc4d0f611ba2dc0dea (tree)
日時2020-04-04 07:29:15
作者Hironori Kitagawa <h_kitagawa2001@yaho...>
コミッターHironori Kitagawa

ログメッセージ

lltjfont.sty: fix \bfseries and \mdseries

変更サマリ

差分

--- a/src/addons/luatexja-fontspec-27c.sty
+++ b/src/addons/luatexja-fontspec-27c.sty
@@ -3,7 +3,7 @@
33 %
44
55 \NeedsTeXFormat{LaTeX2e}
6-\ProvidesPackage{luatexja-fontspec-27c}[2020/01/26 fontspec support of LuaTeX-ja]
6+\ProvidesPackage{luatexja-fontspec-27c}[2020-04-04 fontspec support of LuaTeX-ja]
77 \RequirePackage{l3keys2e}
88 \ExplSyntaxOn
99
@@ -314,6 +314,9 @@
314314 }
315315
316316 \DeclareDocumentCommand \setmainjfont { O{} m O{} } {
317+ \ifdefined\DeclareFontSeriesDefault
318+ \DeclareFontSeriesDefault[mc]{bf}{\bfdefault}
319+ \fi
317320 \__ltj_fontspec_set_family:Nnn \mcdefault {#1,#3}{#2}
318321 \unless\ifltj@disablejfam
319322 \DeclareSymbolFont{mincho}{JY3}{\mcdefault}{\mddefault}{n}
@@ -323,6 +326,9 @@
323326 }
324327
325328 \DeclareDocumentCommand \setsansjfont { O{} m O{} } {
329+ \ifdefined\DeclareFontSeriesDefault
330+ \DeclareFontSeriesDefault[gt]{bf}{\bfdefault}
331+ \fi
326332 \__ltj_fontspec_set_family:Nnn \gtdefault {#1,#3}{#2}
327333 \unless\ifltj@disablejfam
328334 \DeclareMathAlphabet{\mathgt}{JY3}{\gtdefault}{\mddefault}{n}
@@ -331,6 +337,9 @@
331337 }
332338
333339 \DeclareDocumentCommand \setmonojfont { O{} m O{} } {
340+ \ifdefined\DeclareFontSeriesDefault
341+ \DeclareFontSeriesDefault[jtt]{bf}{\bfdefault}
342+ \fi
334343 \__ltj_fontspec_set_family:Nnn \jttdefault {#1,#3}{#2}
335344 \normalfont
336345 }
--- a/src/patches/lltjfont.sty
+++ b/src/patches/lltjfont.sty
@@ -3,7 +3,7 @@
33 %
44
55 \NeedsTeXFormat{LaTeX2e}
6-\ProvidesPackage{lltjfont}[2020-04-01 Patch to NFSS2 for LuaTeX-ja]
6+\ProvidesPackage{lltjfont}[2020-04-04 Patch to NFSS2 for LuaTeX-ja]
77
88 %% patching \DeclareTextComposite
99 \def\ltj@chardef@text@cmd#1{%
@@ -833,6 +833,32 @@
833833 \let\mdseries@gt\mddef@ult
834834 \let\mdseries@jtt\mddef@ult
835835 }{}{}
836+\expandafter\patchcmd\csname bfseries \endcsname{%
837+ \ifx\f@family\rmdef@ult \fontseries\bfseries@rm
838+ \else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf
839+ \else\ifx\f@family\ttdef@ult \fontseries\bfseries@tt
840+ \else \fontseries\bfdefault
841+ \fi\fi\fi
842+}{%
843+ \ifx\f@family\rmdef@ult \romanseries\bfseries@rm
844+ \else\ifx\f@family\sfdef@ult \romanseries\bfseries@sf
845+ \else\ifx\f@family\ttdef@ult \romanseries\bfseries@tt
846+ \else \romanseries\bfdefault
847+ \fi\fi\fi
848+}{}{}
849+\expandafter\patchcmd\csname mdseries \endcsname{%
850+ \ifx\f@family\rmdef@ult \fontseries\mdseries@rm
851+ \else\ifx\f@family\sfdef@ult \fontseries\mdseries@sf
852+ \else\ifx\f@family\ttdef@ult \fontseries\mdseries@tt
853+ \else \fontseries\mddefault
854+ \fi\fi\fi
855+}{%
856+ \ifx\f@family\rmdef@ult \romanseries\mdseries@rm
857+ \else\ifx\f@family\sfdef@ult \romanseries\mdseries@sf
858+ \else\ifx\f@family\ttdef@ult \romanseries\mdseries@tt
859+ \else \romanseries\mddefault
860+ \fi\fi\fi
861+}{}{}
836862 \expandafter\patchcmd\csname bfseries \endcsname{\selectfont}%
837863 {%
838864 \ifx\k@family\mcdef@ult \kanjiseries\bfseries@mc
旧リポジトリブラウザで表示