# pdfTeX font expansion error during compilation

Background

I am using Miktex 2.9 and TeXworks on top of that on a Windows 7 64-bit machine. To write my paper I have to use a provided template by 3rd party. However, I am not very experienced with LaTeX, and I can not solve an error which I am getting.

The error

This is the error that I get:

line 30: pdfTeX error (font expansion): auto expansion is only possible with scalable fonts. \maketitle


I believe the error is somehow related to some bitmap fonts and microtype, but I don't know how to solve it.

You can find the template here, in case that someone wants to reproduce the error.

Just in case I will drop the header of the template here:

\documentclass[]{thesis}

% Author name. Separate multiple authors with commas
\author{Max Mustermann}
\title{Title of the Thesis}
\thesistype{Seminararbeit (Bachelorarbeit, Masterarbeit, ...) im Fach Informatik}
\thesiscite{Seminar Thesis~(Seminararbeit)}
\birthday{11. November 1980}
\birthplace{City}
\thesisstart{1. Januar 2009}

\acrodef{ROI}{Region of Interest}{short-indefinite={an}, long-plural-form={Regions of Interest}}

\begin{document}

\pagenumbering{roman}

\maketitle


Question

Obviously, how do I get to solve this problem?

Addition which might be useful from the *.cls file:

% Default fonts
%\RequirePackage[osf]{libertine}  % Linux Libertine
\RequirePackage{lmodern}  % TT: Latin Modern
\RequirePackage{helvet}  % SF: Helvetica
\RequirePackage[bitstream-charter,sfscaled=false]{mathdesign}  % RM: Bitstream Charter
% TODO: nicer math font?

% More encoding and typesetting fixes and tweaks
\RequirePackage[latin1]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{textcomp}
\RequirePackage{fixltx2e}
\ifthenelse{\boolean{earlydraft}}{
\newcommand{\mydisableprotrusion}{}
}{
\RequirePackage[babel,protrusion=true,expansion=true,tracking=false,kerning=true,spacing=true]{microtype}
\newcommand{\mydisableprotrusion}{\microtypesetup{protrusion=false}}
}


Update 1: After performing @Ulrike's suggestion

Suggestion:

~ set microtype expansion = false ~

Results:

Messages tab at TeXstudio says:

Process started: pdflatex.exe -synctex=1 -interaction=nonstopmode "thesis".tex

Trying to make PK font md-chb8t at 1199 DPI...

Running miktex-makemf.exe...

miktex-makemf: The md-chb8t source file could not be found. Running ttf2pk.exe...

miktex-makepk

: PK font md-chb8t could not be created.

Process exited with error(s)


Log tab at TeXstudio says:

!pdfTeX error: pdflatex.exe (file md-chb8t): Font md-chb8t at 1199 not found
==> Fatal error occurred, no output PDF file produced!

• without seeing the thesis class, it is hard to be sure which fonts you are using, but I'd guess the default cm set, try adding \usepackage{lmodern} – David Carlisle Nov 2 '14 at 11:51
• @DavidCarlisle I tried adding \usepackage{lmodern} but it did not work for me. If you don't mind you can have a look at the class using the link I have uploaded. I will add a section of the class as well. – Kristof Tak Nov 2 '14 at 12:03
• oh \usepackage{lmodern} will make no difference as the class does \RequirePackage{lmodern} which is the same thing, In that case I can't see any fonts that it can be using that are not scalable. strange... – David Carlisle Nov 2 '14 at 12:06
• Set expansion=false in the microtype settings. Then compile and check at the end of the log-file the list of fonts. Which have the ending "pk"? – Ulrike Fischer Nov 2 '14 at 12:10
• it's complaining about the title, if you put \end{document} immediately after \maketitle and add \showoutput the log will show which fonts you are using (comment out the microtype line so you get no error – David Carlisle Nov 2 '14 at 12:11

OK, the issue seems to be solved for me. First of all many thank to @UlrikeFischer and @DavidCarlisle for helping me understand the problem.

As can be seen in the Update1 section of the question, the system complains for the lack of some font, however that is not the case. I checked it @ C:\Program Files\MiKTeX 2.9\fonts\tfm\mathdesign\mdbch and all the required fonts are there. If that's not the case with you consider downloading and pasting them to the proper location.

To solve the problem navigate to: C:\Program Files\MiKTeX 2.9\miktex\bin\x64 and run updmap.exe. The program may seem as it hangs for a while, but its probably because it tries to update the whole font tree. This solved the problem for me. After re-compiling everything should work fine.