Am Tue, 7 Apr 2015 23:22:16 +0200 schrieb Frank Mittelbach: > Am 07.04.2015 um 16:01 schrieb Ulrike Fischer: >> 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 > > I answered it there Yes, I saw it. Thanks. >> >> In my opinion the fd-file for the "fallback" font is loaded to late >> in \[log in to unmask] > > > the problem is really that preamble is still setup time so "fallback > font may not be the final one etc etc Yes, I thought that this is the reasoning why \process@table is called a \begin{document}. >> I found a workaround but I'm in no way sure >> that it hasn't some unwanted side-effects. > > I don't think it would have but it is executed unnecessarily often as > attempting to load anything only makes sense if the family got changed. > Not sure if this should get changed In my opinion it should. The core ingredients are an "exotic" fontencoding (T5, LGR, ....)(e.g. through a language with such an encoding) and a font family which has no own fd-files for this encoding. Then you can be bitten quite easily with the bug as the aux-file with the \selectlanguage is read *before* \process@table (compile twice): \documentclass{article} \usepackage{newpxtext} \usepackage[vietnam]{babel} \begin{document} blub \end{document} And if one google a bit for "corrupted NFSS" one can find quite a number of questions with "cyrillic", "vietnames", "greek". > without a lot more analysis as this > code has basically stayed untouched for a really really long time but > after spending a good deal of time tonight on it I can't see anything > wrong with it -- currently running the LaTeX regression test suite > against it but I'm not sure how much of exotic NFSS cases this really tests I don't see what harm it can do to load an fd-file apart from a tiny loss of speed and memory. Probably it would be okay too to load it directly in the \DeclareFontSubstituation command in t5enc.def. -- Ulrike Fischer http://www.troubleshooting-tex.de/