[Tex/LaTex] pdfTeX error (font expansion): auto expansion is only possible with scalable

errorsfont-expansionfontsmicrotype

I'm using a custom class file.

My main file looks like this:

\documentclass[12pt,a4paper]{thesis}
\begin{document}
\frontmatter
    \pagenumbering{alph}

    \pagenumbering{roman}
    \clearpage

    \cleardoublepage
    \tableofcontents
    \clearpage
    \listoffigures
    \clearpage
    \listoftables

 \mainmatter
       \part{test}
      \input{test}
\end{document}

If I put this in my test.tex it does work:

\chapter{test}
\label{chapter:test}
test 

When it becomes more text (lets say 40x the word "test") I get the error stated in my question title.

To test it I brought my class file down to this:

\ProvidesClass{thesis}
\NeedsTeXFormat{LaTeX2e}

% Based on the memoir class
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{memoir}}
\ProcessOptions
\LoadClass{memoir}

I'm totally confused what is causing my error now.

This is the complete error:

! pdfTeX error (font expansion): auto expansion is only possible with scalable 
fonts.
\AtBegShi@Output ...ipout \box \AtBeginShipoutBox 
                                                  \fi \fi 

Best Answer

You have to load a scalable font like lmodern:

\usepackage[T1]{fontenc}
\usepackage{lmodern}

or install the cm-super fonts.