# Font size is different on the Contents page

I use memoir class and got some problems with ToC. Chapter style defined as:

\font\robotoLarge="name:Roboto:protrusion=default;expansion=default;tlig;trep" at 24pt

\makechapterstyle{general}{
\renewcommand*{\printchaptername}{}
\renewcommand*{\printchapternum}{}
\renewcommand*{\printchaptertitle}[1]{\hspace*{16mm}\robotoLarge{}##1\rule[-1ex]{0pt}{1ex}}
\renewcommand*{\afterchaptertitle}{\hrule height 0.5mm\vskip 40pt}}\chapterstyle{general}


But when ToC is created, the chapter style is defferent: the font is smaller, the \hrule has no space before and sticks to letters. How can the style of ToC be fixed to be the same as my main chapterstyle?

-
Welcome to TeX.SE! It would help if you posted a MWE (minimum working example), rather than some code snippets, that generates the problem behavior you're trying to get rid of. –  Mico Mar 19 '12 at 13:30
You should use fontspec facilities for defining the "Roboto" font for usage in your document, not resorting to the \font primitive. –  egreg Mar 19 '12 at 13:42
egreg, thanks. I will rewrite the code to use fontspec. –  SadChi Mar 20 '12 at 6:35

The toc title is typeset using the part of the chapter style which is suitable for un-numbered pages. People often forget to add this part, see \printchapternonum. Also remember that the un-numbered part never issues \afterchapternum so it may be an idea to add this to \printafternonum (which is empty by default).

Since I have no idea what that font is about, please post a minimal example, and which engine you are using. This test using palatino, does not seem to have any differences between numbered and un numbered:

\documentclass[a4paper]{memoir}
\usepackage[T1]{fontenc}
\def\robotoLarge{\renewcommand{\rmdefault}{ppl}\fontsize{24pt}{30pt}\bfseries}

\makechapterstyle{general}{

Thanks! fontspec and \printafternonum make everything working as it should. –  SadChi Mar 20 '12 at 6:36