# Can't substitute LGR font with fbb if [proportional] option given

Running pdflatex, I'm unable to substitute a Greek font with the fbb package if I give the [proportional] option to the package. Without that option, the substitution is fine.

Is there a reason this doesn't work, or is it possibly a bug in the fbb package. If the later, how do I report it?

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[LGR,T1]{fontenc}
\usepackage{substitutefont}
\usepackage[proportional]{fbb}
%\usepackage{fbb}                             % works fine without option
\substitutefont{LGR}{\rmdefault}{Tempora-TLF}
\usepackage[greek,english]{babel}

\begin{document}
\textgreek{αβγδεζηθ}
\end{document}


I get this warning:

LaTeX Font Warning: Font shape LGR/fbb-LF/m/n' undefined
(Font)              using LGR/cmr/m/n' instead on input line 12.


## migrated from tex.meta.stackexchange.comSep 18 '17 at 6:26

This question came from our discussion, support, and feature requests site for users of TeX, LaTeX, ConTeXt, and related typesetting systems.

With the proportional option fbb redefine \rmdefault in \AtEndPreamble, so you should postpone the substituation:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[LGR,T1]{fontenc}
\usepackage{substitutefont}
\usepackage[proportional]{fbb}

\AtEndPreamble{\substitutefont{LGR}{\rmdefault}{Tempora-TLF}}

\usepackage[greek,english]{babel}

\begin{document}
\textgreek{αβγδεζηθ}
\end{document}

• Also \AtBeginDocument works. In my opinion, babel should be loaded earlier; my preference is fontenc, inputenc and babel as early as possible, in that order. There's no need to explicitly load LGR, by the way (with an up-to-date TeX system). – egreg Sep 21 '17 at 21:32
• Wow, would have never figured that out. I don't know Tex well enough to read most package files, but I was looking for something messing with the LGR encodings. Still, this feels like a package bug. – dedded Sep 22 '17 at 12:23