I run into a problem with T5-encoding and a font family which
doesn't support this encoding.
I did sent a question on tex.SX:
http://tex.stackexchange.com/questions/237188/corrupted-nfss-tables
In my opinion the fd-file for the "fallback" font is loaded to late
in \[log in to unmask] I found a workaround but I'm in no way sure
that it hasn't some unwanted side-effects.
\documentclass{book}
\usepackage[T5,T1]{fontenc}
\makeatletter
\def\wrong@fontshape{%
\csname D@\f@encoding\endcsname % install defaults if in math
\edef\reserved@a{\csname\curr@fontshape\endcsname}%
\ifx\last@fontshape\reserved@a
\errmessage{Corrupted NFSS tables}%
\error@fontshape
\else
\let\f@shape\default@shape
\expandafter\ifx\csname\curr@fontshape\endcsname\relax
\let\f@series\default@series
\expandafter
\ifx\csname\curr@fontshape\endcsname\relax
\let\f@family\default@family
\fi \fi
\fi
\@font@warning{Font shape `\expandafter\string\reserved@a'
\expandafter\@gobble\string\@undefined\MessageBreak
using `\curr@fontshape'
instead\@wrong@font@char}%
\begingroup\try@load@fontshape\endgroup %<--------------new
\global\let\last@fontshape\reserved@a
\gdef\@defaultsubs{%
\@font@warning{Some font shapes were not available, defaults
substituted.\@gobbletwo}}%
\global\expandafter\expandafter\expandafter\let
\expandafter\reserved@a
\csname\curr@fontshape\endcsname
\xdef\font@name{%
\csname\curr@fontshape/\f@size\endcsname}%
\pickup@font}
\makeatother
\renewcommand\rmdefault{fve}%no T5fve.fd
\fontencoding{T1}\fontfamily{\familydefault}\selectfont
\fontencoding{T5}\selectfont
\selectfont %error
\begin{document}
blub
\end{document}
--
Ulrike Fischer
http://www.troubleshooting-tex.de/