Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

Thanks for your help!

share|improve this question
    
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
1  
@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
show 2 more comments

1 Answer

up vote 6 down vote accepted

You should add

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

to your elenc.def file, just after

\DeclareFontEncoding{EL}{}{}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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