# “Corrupted NFSS Tables” Using otftotfm and Fontenc

I have just converted some OTF fonts using otftotfm; these fonts were created using a custom encoding I wrote called EL (I needed to modify the T1 encoding to include extra ligatures). When I try to test whether the font works in a simple file as follows, I get the following output. What is causing the "Corrupted NFSS tables" message, and how can I resolve the issue?

LaTeX Font Warning: Font shape EL/cmr/m/n' undefined
(Font)              using EL/cmr/m/n' instead on input line 100.

! Corrupted NFSS tables.
wrong@fontshape ...message {Corrupted NFSS tables}
error@fontshape else let f...
l.100 \fontencoding\encodingdefault\selectfont


I created the fonts using the following command.

otftotfm -a -e el.enc -fcalt -fdlig -ffrac -fkern -fonum -fordn -fpnum -fsinf \
-fsmcp -fsubs -fsups -fzero --vendor crimson Crimson-Roman.otf \
Crimson-Roman


Here is the test file I am using to check whether the font works.

\documentclass[a4paper]{article}
\usepackage[EL]{fontenc}
\pdfmapfile{crimson.map}
\renewcommand{\rmdefault}{Crimson}
\begin{document}
The
\end{document}


The files elenc.def and elcrimson.fd are both visible to pdfTeX, as I have verified using kpsewhich.

-
You might try with \DeclareFontSubstitution{EL}{Crimson}{m}{n} adding also \DeclareErrorFont{EL}{Crimson}{m}{n}{10} – egreg Mar 4 '13 at 15:59
@egreg Where would I put the declaration? If I try to place it above \usepackage[EL]{fontenc}, I get the error "Encoding scheme 'EL' unknown". If I place it after \usepackage[EL]{fontenc}, it does not help, since the error seems to originate from the code in fontenc, which has already been parsed. – void-pointer Mar 4 '13 at 16:04
You don't have fontspec; are you meaning fontenc? I'd say \usepackage[T1,EL]{fontenc} and then define a small package crimson.sty with the needed font declarations. – egreg Mar 4 '13 at 16:07
Oops, yes, I meant to say fontenc, not fontspec. – void-pointer Mar 4 '13 at 16:08
@void-pointer: Put the two commands mentioned by egreg in elenc.def (behind the line \DeclareFontEncoding{EL}{}{} which declares the encoding. – Ulrike Fischer Mar 4 '13 at 17:01

\DeclareFontSubstitution{EL}{Crimson}{m}{n}

to your elenc.def file, just after
\DeclareFontEncoding{EL}{}{}