1

After a recent TeX Live update, my documents, which used to compile properly, are now typeset with a wrong font. I then unsuccessfully tried to understand how I should do fonts "the right way". Since I am under time pressure, I hope it is okay to just ask here for a solution to my problem.

I have tried four scenarios:

1 Compilation with pdfLaTeX

\documentclass{article}
\pagestyle{myheadings}
\markright{My \textbf{header}}
\usepackage[fleqn]{amsmath}

%\usepackage{fontspec}
\usepackage{fouriernc}
%\usepackage{polyglossia}

\begin{document}
My \textbf{text} and \textbf{equation}:
\begin{align}
F_\text{G}
\end{align}
\end{document}

Compiling the MWE above with pdfLaTeX produces: enter image description here This looks fine.

2 Compilation with LuaLaTeX

\documentclass{article}
\pagestyle{myheadings}
\markright{My \textbf{header}}
\usepackage[fleqn]{amsmath}

%\usepackage{fontspec}
\usepackage{fouriernc}
%\usepackage{polyglossia}

\begin{document}
My \textbf{text} and \textbf{equation}:
\begin{align}
F_\text{G}
\end{align}
\end{document}

Compiling the MWE above with LuaLaTeXproduces: enter image description here All fonts except the normalsize math font are wrong.

3 Adding fontspec

\documentclass{article}
\pagestyle{myheadings}
\markright{My \textbf{header}}
\usepackage[fleqn]{amsmath}

\usepackage{fontspec}
\usepackage{fouriernc}
%\usepackage{polyglossia}

\begin{document}
My \textbf{text} and \textbf{equation}:
\begin{align}
F_\text{G}
\end{align}
\end{document}

Compiling the MWE above with LuaLaTeXproduces: enter image description here This looks fine.

4 Adding polyglossia

\documentclass{article}
\pagestyle{myheadings}
\markright{My \textbf{header}}
\usepackage[fleqn]{amsmath}

\usepackage{fontspec}
\usepackage{fouriernc}
%\usepackage{polyglossia}

\begin{document}
My \textbf{text} and \textbf{equation}:
\begin{align}
F_\text{G}
\end{align}
\end{document}

Compiling the MWE above with LuaLaTeXproduces: enter image description here Regular text and the math index are wrong now.

This behavior only occurred after the TeX Live update. Has there been a significant change?

Questions

My goal is to use the fonts I used to get with the fouriernc package, use polyglossia (I have issues with babel and isodate with the language set to nswissgerman), and compile with LuaLaTeX.

  1. Is this possible?
  2. What is the simplest, most lightweight (i.e. of compiling time) way to achieve this? Is it, for example, possible to set my desired font(s) with fontspec instead of loading fouriernc?

Thanks a lot for your input!

  • 1
    See tex.stackexchange.com/a/522943/2388. Using fouriernc or fourier to setup text fonts is simply wrong for lualatex (and always was) – Ulrike Fischer Jan 7 '20 at 11:47
  • @UlrikeFischer, thanks for your reply! I am, however, confused as you use fourier in your MWE on that page. What would be a non-wrong way to use the fonts in fouriernc or similar? Btw, do you know of a list like tug.org/FontCatalogue/mathfonts.html of LuaLaTeX-compatible fonts, possibly with instructions of proper use? – FlorianL Jan 7 '20 at 14:25
  • My MWE then resets the text font. – Ulrike Fischer Jan 7 '20 at 14:30
  • But without loading fourier, \setmainfont is undefined. So fourier does seem to be doing something useful. On the other hand you said using fourier is simply wrong for lualatex. So I wonder how to do things properly. (Sorry for insisting and my ignorance.) – FlorianL Jan 7 '20 at 15:24
  • fourier (at least newer versions) load fontspec, and this resets the main font to latin modern. – Ulrike Fischer Jan 7 '20 at 15:26
3

fouriernc loads fourier, and this loads fourier-orns, and newer version of this package loads (with xelatex and lualatex) the fontspec package.

fontspec changes the font encoding to TU (that is the suitable encoding for the unicode engines). As fourier doesn't setup its text fonts for TU the text fonts now fall back to lmr:

LaTeX Font Warning: Font shape `TU/fnc/m/n' undefined
(Font)              using `TU/lmr/m/n' instead on input line 6.

The math font setup is not affected.

To best way to get suitable text fonts is to set them up with \setmainfont. As fouriernc loads fontenc and setup math font, it is best to load it early, so that fontspec can take over correctly.

\documentclass{article}
\usepackage[fleqn]{amsmath}
\usepackage{fouriernc}%loads fontspec
\usepackage{polyglossia}
\setmainfont{heuristica}[Scale=0.91]
\begin{document}
My \textbf{text} and \textbf{equation}:
\begin{align}
F_\text{G}
\end{align}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.