# pdfTeX error (font expansion): auto expansion is only possible with scalable

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


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

-

You have to load a scalable font like lmodern:

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


or install the cm-super fonts.

-
But wait, i wanna use Minion Pro. Does this mean i cant use it or? –  Elmer Feb 9 '11 at 21:04
As far as I know there is no configuration for MinionPro –  Herbert Feb 9 '11 at 21:22
no, for microtype. There must be a configuration file which defines what to do with the characters. –  Herbert Feb 9 '11 at 21:37
@Herbert, @Joseph: Microtype works fine with every (scalable) font. If no specific configuration file exists it falls back to the default configuration. The error message above means that the document is using a bitmap font. A new configuration file will not solve the problem. –  Ulrike Fischer Feb 11 '11 at 14:20
I don't fully understand why this answer is accepted. This sounds like the solution is to not solve the problem, right? Or am I doing something wrong, and this answer really provides a solution how to use MinionPro with microtype? 5 years ago, I successfully wrote my diploma thesis with MinionPro + microtype following these instructions, so in general it is possible, but using the more recent FontPro approach gives me the same problem as the OP. –  bluenote10 Mar 14 '14 at 16:16

Check in the log-file in which package/file microtype is loaded and comment the call. Then compile your document (now without the microtype package) with pdflatex. Then check at the end of the log-file the list of fonts and identify the bitmap font(s) (with ending .pk) causing the problem.

-
Check in the log-file in which package/file microtype is loaded how can I notice/identify that? –  Kristof Tak Nov 2 '14 at 0:23

Configuration files for fonts can be found in tex/latex/microtype/ subdirectory of your TeX installation.

But wait, i have no configuration file for PSCyr font; however i can use font expansion in a way like this (stretch and shrink are way too large, for the sake of demonstration):

% in preamble:
\SetExpansion[stretch = 70, shrink = 70,] { encoding = {T2A} } { }
\DeclareMicrotypeSet{t2atext}{encoding=T2A}
\UseMicrotypeSet{t2atext}


An i have result like this:

It's clear, i have font expansion working here.

The point is that configuration file contains commands for character protrusion and font expansion --- like this one --- nothing special or magic.

So, you can write your own command, you can collect them in your own configuration file for your favorite font face.

microtype's manual is great! Well, i set stretchability and shrinkability to 70/1000th of em --- for T2A-encoded font. And asked microtype to use these rules. Like that. Just try!-) You will like it. –  brownian Feb 11 '11 at 19:15
I got it all working now. Just some text looks weird, i think cuz of Minion Pro not being able to handle it. For instance: when i type griffie it looks like this in my pdf:ifïnAe. Is this something that could be fixed using microtype? I checked the microtype manual but thats abracadabra to me. –  Elmer Feb 13 '11 at 18:26
Well, i've never got things like that. You can, however, try to disable ligatures (the manual, section 8), i would try this \DisableLigatures[ri]{encoding = T1} (and, possibly, experiment a bit more). –  brownian Feb 14 '11 at 14:22