LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Ulrike Fischer <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Tue, 7 Apr 2015 16:01:47 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (68 lines)
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/

ATOM RSS1 RSS2