This is a consequence of the recent changes in fontspec
that stopped loading xunicode
by default. The relevant code in frenchb.ldf
is
\ifFBunicode
\ifdefined\DeclareUTFcharacter
\else
\@ifpackageloaded{luainputenc}{}%
{\PackageWarning{frenchb.ldf}%
{Add \protect\usepackage{fontspec} to the\MessageBreak
preamble of your document,}%
}%
\fi
\else
[...irrelevant part...]
\fi
The \ifBunicode
conditional is true when the engine used is either XeTeX or LuaTeX; in this case nothing is done if \DeclareUTFcharacter
is defined, assuming this means fontspec
has been loaded. This is the wrong test to do, because it just checks whether xunicode
is loaded, not fontspec
. Since this package doesn't load it any longer, the test returns false, so the warning is issued, because you aren't loading luainputenc
, of course.
You can use the silence
package to get rid of this spurious warning until babel-french
is updated to look for, say, \setmainfont
.
Update
With babel-french
version 3.2g, released 2017/01/30, the problem should be fixed. In the notes of the .dtx
file we see
\changes{v3.2g}{2017/01/24}{fontspec defines TU encoding now and
no longer loads xunicode.sty. Test changed.}
that shows the maintainers were already aware of the issue. Now the test is
\ifFBunicode
\@ifpackageloaded{fontspec}{}%
{\@ifpackageloaded{luainputenc}{}%
{\PackageWarning{frenchb.ldf}%
{Add \protect\usepackage{fontspec} to the\MessageBreak
preamble of your document, reported}%
}%
}
\else
[...irrelevant part...]
\fi
so the loading of fontspec
is checked specifically.
However, this doesn't allow (as it was before) to load fontspec
after babel
.