[Tex/LaTex] On pdfTeX error (font expansion): auto expansion is only possible with scalable fonts, microtype package

font-expansionfontsmicrotypemiktex

According to this question pdftex-error-font-expansion-auto-expansion-is-only-possible-with-scalable

To get rid of the error above, is to load a scalable font like lmodern

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

And it does.

But here is my question: This MWE compiles OK on TL 2015 without \usepackage{lmodern} loaded! but gives an error with MikTeX 2.9 on windows. Same Latex file. Not only that, if I removed microtype package and not load lmodern, then MikTeX will now compile it without the error.

\documentclass[12pt]{report}%  
\usepackage[T1]{fontenc}
%\usepackage{lmodern}  %This is only needed for MikTeX, why??
\usepackage[tracking]{microtype}
\usepackage{lipsum}  % to generate filler text    
\begin{document}   
\lipsum[2-4]
\chapter{Introduction} 
\end{document}

The above compiled OK with TL 2015, but gives error with MikTeX:

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)
pdflatex index.tex

(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\mt-cmr.cfg)
[1{C:/Users/me/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}
! pdfTeX error (font expansion): auto expansion is only possible with scalable
fonts.
<to be read again>
                   \endgroup \set@typeset@protect
l.9 \chapter
            {Introduction}
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on index.log.

Now on Linux:

pdflatex index.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex)

No error. Clean compile. Now, removing the \usepackage[tracking]{microtype} then MiKTeX will now compile it ok:

\documentclass[12pt]{report}%  
\usepackage[T1]{fontenc}
\usepackage{lipsum}  % to generate filler text    
\begin{document}   
\lipsum[2-4]
\chapter{Introduction} 
\end{document}

So loading lmodern is not needed if one also do not load microtype and is running MikTex. But if using TL instead of MikTex, then one can load microtype and not load lmodern and it will work.

Here is the file list on MiKTex:

 *File List*
  report.cls    2007/10/19 v1.4h Standard LaTeX document class
  size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
 lmodern.sty    2009/10/30 v1.6 Latin Modern Fonts
microtype.sty    2013/05/23 v2.5a Micro-typographical refinements (RS)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
microtype-pdftex.def    2013/05/23 v2.5a Definitions specific to pdftex (RS)
microtype.cfg    2013/05/23 v2.5a microtype main configuration file (RS)
  lipsum.sty    2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text
   t1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
  mt-cmr.cfg    2013/05/19 v2.2 microtype config. file: Computer Modern Roman (
RS)
 ***********

Here is the file list on TL 2015:

  report.cls    2014/09/29 v1.4h Standard LaTeX document class
  size12.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
 lmodern.sty    2009/10/30 v1.6 Latin Modern Fonts
microtype.sty    2013/05/23 v2.5a Micro-typographical refinements (RS)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
microtype-pdftex.def    2013/05/23 v2.5a Definitions specific to pdftex (RS)
microtype.cfg    2013/05/23 v2.5a microtype main configuration file (RS)
  lipsum.sty    2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text
   t1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
  mt-cmr.cfg    2013/05/19 v2.2 microtype config. file: Computer Modern Roman (
RS)
 ***********

The only difference I see is keyval.sty On TL it is 1.15 and on MikTex it is 1.13

Here is full console output from MikTex, which shows all the fonts loaded:

X:\data\latex\empty_page>pdflatex index.tex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)
entering extended mode
(X:\data\latex\empty_page\index.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2013-05-26, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,
 lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n
german-x-2013-05-26, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman
ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm
an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl
ishmax, welsh, loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\report.cls"
Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size12.clo"))
("C:\Program Files\MiKTeX 2.9\tex\latex\base\fontenc.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1enc.def"))
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\microtype.sty
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\microtype-pdftex.de
f) (C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\microtype.cfg))
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\lipsum\lipsum.sty)
(X:\data\latex\empty_page\index.aux)
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\mt-cmr.cfg)
[1{C:/Users/me/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}
! pdfTeX error (font expansion): auto expansion is only possible with scalable
fonts.
<to be read again>
                   \endgroup \set@typeset@protect
l.9 \chapter
            {Introduction}
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on index.log.

Question is : Who is correct here? MikTeX or TL? Are these supposed to work the same way, since it is all Latex? I am just trying to understand what is going on, that is all 🙂


Update:

This is MiKTex console output when using T1 and lmodern but not using microtype

X:\data\latex\empty_page>pdflatex index.tex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)
entering extended mode
(X:\data\latex\empty_page\index.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2013-05-26, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,
 lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n
german-x-2013-05-26, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman
ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm
an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl
ishmax, welsh, loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\report.cls"
Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size12.clo"))
("C:\Program Files\MiKTeX 2.9\tex\latex\base\fontenc.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1enc.def"))
("C:\Program Files\MiKTeX 2.9\tex\latex\lm\lmodern.sty")
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\lipsum\lipsum.sty)
(X:\data\latex\empty_page\index.aux)
("C:\Program Files\MiKTeX 2.9\tex\latex\lm\t1lmr.fd") [1{C:/Users/me/AppData/Lo
cal/MiKTeX/2.9/pdftex/config/pdftex.map}]
Chapter 1.
[2] (X:\data\latex\empty_page\index.aux)

 *File List*
  report.cls    2007/10/19 v1.4h Standard LaTeX document class
  size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
 lmodern.sty    2009/10/30 v1.6 Latin Modern Fonts
  lipsum.sty    2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text
   t1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
 ***********

 ){C:/Program Files/MiKTeX 2.9/fonts/enc/dvips/lm/lm-ec.enc}<C:/Program Files/M
iKTeX 2.9/fonts/type1/public/lm/lmbx12.pfb><C:/Program Files/MiKTeX 2.9/fonts/t
ype1/public/lm/lmr12.pfb>
Output written on index.pdf (2 pages, 53427 bytes).
Transcript written on index.log.

This is MikTex output, when using T1 and not using lmodern and also not using microtype

X:\data\latex\empty_page>pdflatex index.tex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)
entering extended mode
(X:\data\latex\empty_page\index.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2013-05-26, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,
 lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n
german-x-2013-05-26, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman
ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm
an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl
ishmax, welsh, loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\report.cls"
Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size12.clo"))
("C:\Program Files\MiKTeX 2.9\tex\latex\base\fontenc.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1enc.def"))
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\lipsum\lipsum.sty)
(X:\data\latex\empty_page\index.aux) [1{C:/Users/me/AppData/Local/MiKTeX/2.9/pd
ftex/config/pdftex.map}]
Chapter 1.
[2] (X:\data\latex\empty_page\index.aux)

 *File List*
  report.cls    2007/10/19 v1.4h Standard LaTeX document class
  size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
  lipsum.sty    2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text
 ***********

 ) <C:\Users\me\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\jknappen\ec\dpi600\ecb
x2488.pk> <C:\Users\me\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\jknappen\ec\dpi
600\ecrm1200.pk>
Output written on index.pdf (2 pages, 23789 bytes).
Transcript written on index.log.

Update 2

Using the MikTex package manager, it shows cm-super is not installed by default as the case with TL. So installed it on windows: (64 MB size)

starting package maintenance...
going to download 64797738 bytes
going to install 840 file(s) (1 package(s))
downloading http://ftp.math.purdue.edu/mirrors/ctan.org/systems/win32/miktex/tm/packages/cm-super.tar.lzma...

and now the first example above, compiles OK on MikTex. Here is the console output

pdflatex index.tex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)
entering extended mode
(X:\data\latex\empty_page\index.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2013-05-26, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,
 lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n
german-x-2013-05-26, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman
ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm
an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl
ishmax, welsh, loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\report.cls"
Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size12.clo"))
("C:\Program Files\MiKTeX 2.9\tex\latex\base\fontenc.sty"
("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1enc.def"))
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\microtype.sty
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty")
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\microtype-pdftex.de
f) (C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\microtype.cfg))
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\lipsum\lipsum.sty)
(X:\data\latex\empty_page\index.aux)
(C:\Users\me\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\mt-cmr.cfg)
[1{C:/Users/me/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
Chapter 1.
[2] (X:\data\latex\empty_page\index.aux)

 *File List*
  report.cls    2007/10/19 v1.4h Standard LaTeX document class
  size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
microtype.sty    2013/05/23 v2.5a Micro-typographical refinements (RS)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
microtype-pdftex.def    2013/05/23 v2.5a Definitions specific to pdftex (RS)
microtype.cfg    2013/05/23 v2.5a microtype main configuration file (RS)
  lipsum.sty    2014/07/27 v1.3 150 paragraphs of Lorem Ipsum dummy text
  mt-cmr.cfg    2013/05/19 v2.2 microtype config. file: Computer Modern Roman (
RS)
 ***********

 ){C:/Users/me/AppData/Roaming/MiKTeX/2.9/fonts/enc/dvips/cm-super/cm-super-t1.
enc}<C:/Users/me/AppData/Roaming/MiKTeX/2.9/fonts/type1/public/cm-super/sfbx248
8.pfb><C:/Users/me/AppData/Roaming/MiKTeX/2.9/fonts/type1/public/cm-super/sfrm1
200.pfb>
Output written on index.pdf (2 pages, 32481 bytes).
Transcript written on index.log.

How are poor users supposed to know these things? Too many packages. If TL installs cm-super by default, I think MikTeX should also do the same.

Best Answer

TeX Live includes cm-super. If you write

\usepackage[T1]{fontenc}

then the fonts from cm-super are used and these are scalable. Therefore, you don't get an error.

I assume that you do not have cm-super installed for MikTeX and you, therefore, get the error. Otherwise, MikTeX does not default to these fonts for some reason, even if T1 is requested.

I don't have MikTeX so I don't know what it does in this case. But the error is not present in this case in TL for this reason.

In fact, with TeX Live 2015, scalable versions of Computer Modern are used even if T1 is not selected.