# Font warning using memoir

I am getting the following font warning using memoir:

LaTeX Font Warning: Font shapre T1/cmss/bx/scundefined (Font) using T1/cmss/bx/n'instead on input line 14


where line 14 points to where I have \mainmatter in my source file.

Here is the source code

\documentclass[oneside,12pt]{memoir}
\usepackage{graphicx}
\usepackage[T1]{fontenc}
\usepackage{mathpazo}
\begin{document}

\frontmatter
\tableofcontents
\mainmatter

\chapter{Introduction}
Introduction

\end{document}


which should select the Palatino font.

# Update

If I use the sniplet below from egreg's answer:

\sbox0{\sffamily x}
\DeclareFontShape{T1}{cmss}{bx}{sc}{<->ssub*cmss/bx/n}{}


the warning goes away, but I get some font artifacts:

With this, is there a way to force \chapterstyle{madsen} to use palatino?

-
You're requesting somewhere a small caps boldface sans serif font which doesn't exist in the Computer Modern Sans Serif family. It's a glitch of the chapter style, it seems. –  egreg Mar 25 '12 at 22:22
Moreover, \fontfamily{ppl} is not the correct way to define Palatino as the default font: \usepackage{mathpazo} is the right way. –  egreg Mar 25 '12 at 22:29
Thanks @egreg. The warning goes away when I comment out the line \chapterstyle{madsen}, so I guess, from your comment, that the glitch is on that style. In your experience, is this something that may require a big fix? –  Amelio Vazquez-Reina Mar 25 '12 at 23:00
why would it select the palatino font without calling the palatino package? When compiling it with \usepackage{palatino}, it only yells some Overfull \hbox warnings. –  henrique Mar 26 '12 at 2:02

It's an innocuous warning. If you really want it to disappear, then write

\sbox0{\sffamily x}
\DeclareFontShape{T1}{cmss}{bx}{sc}{<->ssub*cmss/bx/n}{}


The first line loads the sans serif family, the second one declares that the substitution which triggers the warning should be silent.

Note that in order to get Palatino as the main text font you should load

\usepackage{mathpazo}


(texdoc psnfss will shed some light on this).

For getting the chapter heading all in Palatino, use this code:

\documentclass[oneside,12pt]{memoir}
\usepackage[T1]{fontenc}
\usepackage{mathpazo}

\usepackage{graphicx}

\chapterstyle{default}
\renewcommand*{\chapnamefont}{%
\normalfont\Large\scshape\raggedleft}
\renewcommand*{\chaptitlefont}{%
\normalfont\Huge\bfseries\raggedleft}
\renewcommand*{\printchapternum}{%
\makebox[0pt][l]{\hspace{0.4em}%
\resizebox{!}{4ex}{%
\chapnamefont\bfseries\thechapter}%
}%
}%
\renewcommand*{\printchapternonum}{%
\makebox[0pt][l]{\hspace{0.4em}%
\resizebox{!}{4ex}{%
\chapnamefont\bfseries 1}%
}%
}%
\afterchapternum %
}%

\renewcommand*{\afterchapternum}{%
\par\hspace{1.5cm}\hrule\vskip\midchapskip}}

Thanks @egreg! The warning went away. Is there a way to force \chapterstyle{madsen} to use palatino? –  Amelio Vazquez-Reina Mar 26 '12 at 13:50
@roseck Yes: say \usepackage{mathpazo}` in the document preamble. –  egreg Mar 26 '12 at 13:54