If I use the newpx package and then load fontspec and try to select a font it fails. See the minimal example below.
The files (compiled with lualatex) for which fontspec font selection fails (by loading newpx before fontspec) with TeX Live 2021 and the packages up to date (via tlmgr) today (2022-03-28) used to work with an earlier TeX Live version (TeX Live 2020, or 2021 but with older versions of the packages, I can't tell exactly when).
I can't tell if the problem is due to newpx or fontspec (or luaotfload or something else).
Could you help me identify the cause, find a workaround and tell me who to report the problem to so that it can be fixed?
Thanks and have a nice day
%%%% MWE
\documentclass{scrartcl}
\usepackage{newpxtext} % comment newpx and everything is ok
% this used to work with an older version of TeX Live (older version of the packages)
\usepackage{fontspec}
% \usepackage{kurier} % not needed
\setmainfont{texgyrebonum-regular.otf} % font selection by file name gives no error but does not select the correct font: newpx font (TeXGyrePagellaX) used instead of TeX Gyre Bonum
\setsansfont{Kurier} % font selection by font name gives a fontspec error: "The font (Kurier, or any other font selected by font name) cannot be found"
\begin{document}
ABCXYZ
\end{document}
%%%%
newpxtext
and then use a different font?newpxtext
as my main font but calling other fonts viafontspec
and it now fails if I use thenewpxtext
package.\setmainfont{texgyrebonum-regular.otf}
and\setsansfont{Kurier}
. And I guess this is reproducible for anyone with an up-to-date TeX Live.