I'm using pdfLaTeX and a sans serif family that supports a light (l) face. I'd like to substitute the default medium (m) face by l only when \sffamily (or \textsf) is called.
In the next example, egreg's solution is only successfull in changing the \mddefault for the roman family, but not for sans serif.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\makeatletter
\renewcommand{\mddefault}{\ifx\f@family\sfdefault sbc\else bx\fi}
\makeatother
\setlength\parskip{\baselineskip}\setlength\parindent{0pt}
\begin{document}
\textrm{The brown fox jumps over the lazy dog} \\
{\usefont{T1}{lmr}{m}{n}The brown fox jumps over the lazy dog} \\ % medium
{\usefont{T1}{lmr}{b}{n}The brown fox jumps over the lazy dog} \\ % bold
{\usefont{T1}{lmr}{bx}{n}The brown fox jumps over the lazy dog} % bold expanded
\textsf{The brown fox jumps over the lazy dog} \\
{\usefont{T1}{lmss}{sbc}{n}The brown fox jumps over the lazy dog}\\ % semi bold condensed
{\usefont{T1}{lmss}{m}{n}The brown fox jumps over the lazy dog} \\ % medium
{\usefont{T1}{lmss}{bx}{n}The brown fox jumps over the lazy dog} % bold expanded
\end{document}

Then I tried to use \DeclareFontShape, but I always get the same type of error. For instance, using an example of pg 425 of The LaTeX Companion :
\documentclass{article}
\DeclareFontShape{0T1}{cmss}{m}{it}{ <-> sub * cmss/m/sl }{}
\begin{document}
text
\end{document}
I get the error:


OT1notOTl(the number one not the letter l). – Ulrike Fischer Jan 20 '13 at 14:51