## LaTeX forum ⇒ Fonts & Character Sets ⇒ "pdfTeX error (font expansion)" when using ccfonts

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
mattlorig
Posts: 19
Joined: Fri May 14, 2010 9:55 pm

### "pdfTeX error (font expansion)" when using ccfonts

When I used the package ccfonts, I get the following error message:

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

My code is here:

\RequirePackage[l2tabu, orthodox]{nag}		% checks for outdated latex commands ... you can remove this if you want\documentclass[10pt]{article} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%         PACKAGES%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[T1]{fontenc}\usepackage{lmodern}\usepackage{microtype}\usepackage{ccfonts}\usepackage{amsmath}                        % need for subequations\numberwithin{equation}{section}\usepackage{graphicx}                       % need for figures\usepackage[plainpages=false, pdfpagelabels]{hyperref} % enables and customizes hyperlinks	\hypersetup{		colorlinks   = true,		citecolor    = blue, %NavyBlue		linkcolor    = Maroon,		urlcolor     = Turquoise		}\usepackage[dvipsnames]{xcolor}\usepackage{amssymb}                        % gives you \mathbb{} font\usepackage[mathscr]{eucal}                 % gives you \mathscr font\usepackage{dsfont}													% gives you \mathds{} font%\usepackage[paperwidth=8.5in,paperheight=11in,top=1.25in, bottom=1.25in, left=1.00in, right=1.00in]{geometry}\usepackage{mathtools}                      % need for show only references'\mathtoolsset{showonlyrefs=true}            % only equations which are labeled AND referenced will numbered																						% IMPORTANT NOTE...must use \eqref{} instead of (\ref{})\usepackage{fixltx2e,amsmath}               % Supposedly, this allows one to use \eqref{} in \caption{}.\MakeRobust{\eqref} \usepackage[left]{showlabels}               % show labels\linespread{1.3}                            % double-space everything with 1.6\usepackage{amsthm}                         % need for theorem-proof environment\allowdisplaybreaks                         % allows page breaks for long equations                                             % you can prevent a page-break with \\*\theoremstyle{plain}\newtheorem{theorem}{Theorem}\numberwithin{theorem}{section}\newtheorem{lemma}[theorem]{Lemma}          % [theorem] ==> theorems and lemmas will share a counter\newtheorem{proposition}[theorem]{Proposition}\newtheorem{corollary}[theorem]{Corollary}%%\theoremstyle{definition}\newtheorem{assumption}[theorem]{Assumption}  \begin{document} For simplicity, we shall assume the following.\begin{assumption}The volatility process $\sigma$ evolves independently of $W$ and $N$.  Moreover, $\sigma$ and the measure $\nu$ satisfy\end{assumption} \end{document}

If I comment out the \begin{assumption} ... \end{assumption} part, I get no error message. If I compile with LuaLaTeX or XeLaTex, I get no error message. I get a similar error message if I include \textbf{} or \url{} (but, again, not when using LuaLaTeX or XeLaTeX). Any direction would be helpful.

Johannes_B
Site Moderator
Posts: 3584
Joined: Thu Nov 01, 2012 4:08 pm
I didn't get an error running the code with pdflatex. It just fired up metafont and compiled the bold font. It went on without a problem.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Johannes_B
Site Moderator
Posts: 3584
Joined: Thu Nov 01, 2012 4:08 pm
I got a hint that your distribution might be outdated. Do you have a current installation of TeX Live or MikTeX?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

mattlorig
Posts: 19
Joined: Fri May 14, 2010 9:55 pm
My current version of MikTeX is 2.9.

Regarding "metafont", I will admit that I am ignorant on this topic. Do I need to do something special to install metafont? If so, can I do it via MikTek's package manager?

Johannes_B
Site Moderator
Posts: 3584
Joined: Thu Nov 01, 2012 4:08 pm

Unfortunately, i don't have any clue, why it is not running in your case.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

mattlorig
Posts: 19
Joined: Fri May 14, 2010 9:55 pm
I just ran the update manager and it turns out many of my packages were way out of date (back to 2010...which I guess tells me how old my computer is!)

I'll see if updating the outdated packages helps.

UPDATE: I updated all installed packages. Still no dice unfortunately. I get the same error as before.

mattlorig
Posts: 19
Joined: Fri May 14, 2010 9:55 pm
If it is in any way helpful...here's the log of the error message:
{C:/Users/mattlorig/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts.\AtBegShi@Output ...ipout \box \AtBeginShipoutBox                                                    \fi \fi 

mattlorig
Posts: 19
Joined: Fri May 14, 2010 9:55 pm
I have a fix (kind of).

If I insert the command
\microtypesetup{expansion=false}
immediately after
\usepackage{microtype}
then I get no error message. I'm not sure exactly what the expansion feature does. But, presumably, I do not want to disable it. In any case, I have a 'hack' solution.

From what I can gather, the problem must be that pdfTeX is not using the vector-valued (metafont) version of the ccfonts. Instead, it is using the bitmap version. If I blow up the PDF, then it is clear the letters are bitmap.

Does anybody know how to "force" pdfTeX to use the metafond version of the ccfonts?

mattlorig
Posts: 19
Joined: Fri May 14, 2010 9:55 pm
I looked closely at the log file. And it is clear that pdfTeX is using bitmap fonts (filetype: .pk)

{C:/Program Files/MiKTeX 2.9/fonts/enc/dvips/cm-super/cm-super-t1.enc} <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concrete\dpi600\ccr5.pk>{C:/Program Files/MiKTeX 2.9/fonts/enc/dvips/lm/lm-rmtt.enc} <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concmath\dpi600\xccmi5.pk> <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concmath\dpi600\xccex10.pk> <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concmath\dpi600\xccsy7.pk> <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concmath\dpi600\xccmi7.pk> <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concmath\dpi600\xccsy10.pk> <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concrete\dpi600\ccr10.pk>{C:/Program Files/MiKTeX 2.9/fonts/enc/dvips/lm/lm-ec.enc} <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concmath\dpi600\xccsy6.pk> <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concrete\dpi600\ccr7.pk> <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concmath\dpi600\xccmi10.pk> <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concmath\dpi600\xccsy9.pk> <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concmath\dpi600\xccmi9.pk> <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concrete\dpi600\ccr9> <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concmath\dpi600\xccsy8.pk>`

So, the issue is that pdfTeX is not using the vector fonts (filetype: pfb ) that are installed in my system.

But, I have no idea how to fix this. I updated MikTeX and I installed cm-fonts. I am using both the lmodern and [T1]{fontenc} packagaes. All of these are the "usual" fixes I have seen on the web.

mattlorig
Posts: 19
Joined: Fri May 14, 2010 9:55 pm
Making some slow progress on an answer here.

I refreshed MikTeX's FNDB and updated the formats (found in MikTeX options).

This partially solved the problem. The ccfonts package now uses vector fonts for text. But, math is still compiled using pixelated characters. So, somehow, MikTeX is not looking for the correct mathamtics fonts. Again...no idea how to solve this. If anybody has some direction, it would be appreciated.