texlive 2026 luatexja-fontspec にて、seriesでmを設定したい

texlive 2026 luatexja-fontspec にて、seriesでmを設定したい

- 村上 TomOne の投稿
返信数: 2

Morisawa Fontsに移行して、LuaLaTeXで使えるよう設定を進めています。

例のように設定したんですが、mだけが

LaTeX Font Warning: Font shape `TU/AP-OTF-ShinGoPr6N(0)/m/n' undefined
(Font)              using `TU/lmr/m/n' instead on input line 37.

と出て、設定が上手く行きません。
series名をmeにするとちゃんと埋め込まれるので、フォントが悪いわけじゃないと思います。
バージョンを上げると直るかと思い、TeX Live 2025→2026に上げましたが、状況は変わりません。

==========================================================
\RequirePackage{plautopatch}
\documentclass[fontsize=12Q]{jlreq}

\usepackage{luatexja}
\usepackage{luatexja-fontspec}
\usepackage[no-math,match,deluxe,expert,morisawa-pr6n]{luatexja-preset}
\usepackage{luatexja-otf}

\usepackage{pxrubrica}
\rubyfontsetup{\rubyfamily}

\defaultjfontfeatures[AP-OTF-ShinGoPr6N]
  {
    YokoFeatures={JFM=jlreq},   %jlreqのJFMを
    TateFeatures={JFM=jlreqv},  %維持する
    Extension = .otf,
    UprightFont = *-Light,
%    BoldFont = *-Bold,
    FontFace = {el}{n}{*-ExLight},
    FontFace = {l} {n}{*-Light},
    FontFace = {r} {n}{*-Regular},
    FontFace = {m} {n}{*-Medium},
    FontFace = {me}{n}{*-Medium},
    FontFace = {db}{n}{*-DeBold},
    FontFace = {b} {n}{*-Bold},
    FontFace = {h} {n}{*-Heavy},
    FontFace = {u} {n}{*-Ultra}
  }
\newjfontfamily{\ShinGo}{AP-OTF-ShinGoPr6N}

\def\testmes{%
テスト~――あいうえお{\rubyfamily あいうえお}「らり」“ア!イ⁉ウ?エ‼オ”〝漢字〟%
葛祇辻鷗\jruby[]{{\UTF{9AD9}}島屋}{たか|しま|や}
☃\ajKuroMaru*{01}\ajTsumesuji*{123}%
\par}


\begin{document}

{\ShinGo\kanjiseries{el}\kanjishape{n}\selectfont el \testmes}
{\ShinGo\kanjiseries{l}\kanjishape{n}\selectfont l \testmes}
{\ShinGo\kanjiseries{r}\kanjishape{n}\selectfont r \testmes}
{\ShinGo\kanjiseries{m}\kanjishape{n}\selectfont m \testmes}
{\ShinGo\kanjiseries{me}\kanjishape{n}\selectfont me \testmes}
{\ShinGo\kanjiseries{db}\kanjishape{n}\selectfont db \testmes}
{\ShinGo\kanjiseries{b}\kanjishape{n}\selectfont b \testmes}
{\ShinGo\kanjiseries{h}\kanjishape{n}\selectfont h \testmes}
{\ShinGo\kanjiseries{u}\kanjishape{n}\selectfont u \testmes}

\end{document}


%%% Local Variables: 
%%% mode: japanese-latex
%%% TeX-master: t
%%% End:
==========================================================

村上 TomOne への返信

Re: texlive 2026 luatexja-fontspec にて、seriesでmを設定したい

- 北川 弘典 の投稿
> LaTeX Font Warning: Font shape `TU/AP-OTF-ShinGoPr6N(0)/m/n' undefined
> (Font)              using `TU/lmr/m/n' instead on input line 37.

この警告メッセージが出るのは luatexja-fontspec のバグですが,
「m」だけがうまくいかないのとはこれとは別の原因です.

fontspec で FontFace={}{}{} と設定した場合,それは通常の UprightFont=... より前に実行され,
「シリーズ m,シェイプ n」についての定義が(FontFace 由来の *-Medium になったあと)
UprightFont 由来の *-Light で上書きされてしまうようです.
北川 弘典 への返信

Re: texlive 2026 luatexja-fontspec にて、seriesでmを設定したい

- 村上 TomOne の投稿
ありがとうございます。
UprightFont = *-Medium,
として、mもちゃんと出るようになりました。

kanjiseries無指定で使うことはないので、影響はなさそうです。