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

Postby mattlorig » Mon Oct 26, 2015 8:49 pm

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:

  1. \RequirePackage[l2tabu, orthodox]{nag} % checks for outdated latex commands ... you can remove this if you want
  2. \documentclass[10pt]{article}
  3.  
  4. %%%%%%%%%%%%%%%%%%%%%%%%%%%%
  5. %
  6. % PACKAGES
  7. %
  8. %%%%%%%%%%%%%%%%%%%%%%%%%%%%
  9.  
  10. \usepackage[T1]{fontenc}
  11. \usepackage{lmodern}
  12. \usepackage{microtype}
  13. \usepackage{ccfonts}
  14. \usepackage{amsmath} % need for subequations
  15. \numberwithin{equation}{section}
  16. \usepackage{graphicx} % need for figures
  17. \usepackage[plainpages=false, pdfpagelabels]{hyperref} % enables and customizes hyperlinks
  18. \hypersetup{
  19. colorlinks = true,
  20. citecolor = blue, %NavyBlue
  21. linkcolor = Maroon,
  22. urlcolor = Turquoise
  23. }
  24. \usepackage[dvipsnames]{xcolor}
  25. \usepackage{amssymb} % gives you \mathbb{} font
  26. \usepackage[mathscr]{eucal} % gives you \mathscr font
  27. \usepackage{dsfont} % gives you \mathds{} font
  28. %\usepackage[paperwidth=8.5in,paperheight=11in,top=1.25in, bottom=1.25in, left=1.00in, right=1.00in]{geometry}
  29. \usepackage{mathtools} % need for `show only references'
  30. \mathtoolsset{showonlyrefs=true} % only equations which are labeled AND referenced will numbered
  31. % IMPORTANT NOTE...must use \eqref{} instead of (\ref{})
  32. \usepackage{fixltx2e,amsmath} % Supposedly, this allows one to use \eqref{} in \caption{}.
  33. \MakeRobust{\eqref}
  34.  
  35. \usepackage[left]{showlabels} % show labels
  36. \linespread{1.3} % double-space everything with 1.6
  37. \usepackage{amsthm} % need for theorem-proof environment
  38. \allowdisplaybreaks % allows page breaks for long equations
  39. % you can prevent a page-break with \\*
  40. \theoremstyle{plain}
  41. \newtheorem{theorem}{Theorem}
  42. \numberwithin{theorem}{section}
  43. \newtheorem{lemma}[theorem]{Lemma} % [theorem] ==> theorems and lemmas will share a counter
  44. \newtheorem{proposition}[theorem]{Proposition}
  45. \newtheorem{corollary}[theorem]{Corollary}
  46. %%
  47. \theoremstyle{definition}
  48. \newtheorem{assumption}[theorem]{Assumption}
  49.  
  50.  
  51. \begin{document}
  52.  
  53. For simplicity, we shall assume the following.
  54. \begin{assumption}
  55. The volatility process $\sigma$ evolves independently of $W$ and $N$. Moreover, $\sigma$ and the measure $\nu$ satisfy
  56. \end{assumption}
  57.  
  58. \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.

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

Postby Johannes_B » Mon Oct 26, 2015 10:36 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.

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

Postby Johannes_B » Mon Oct 26, 2015 11:16 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

Postby mattlorig » Tue Oct 27, 2015 12:22 am

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?

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

Postby Johannes_B » Tue Oct 27, 2015 12:33 am

Metafont should be installed already.

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

Postby mattlorig » Tue Oct 27, 2015 12:43 am

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

Postby mattlorig » Tue Oct 27, 2015 1:19 am

If it is in any way helpful...here's the log of the error message:
  1. {C:/Users/mattlorig/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}
  2. ! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts.
  3. \AtBegShi@Output ...ipout \box \AtBeginShipoutBox
  4. \fi \fi

mattlorig
Posts: 19
Joined: Fri May 14, 2010 9:55 pm

Postby mattlorig » Tue Oct 27, 2015 1:39 am

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

Postby mattlorig » Tue Oct 27, 2015 8:57 am

I looked closely at the log file. And it is clear that pdfTeX is using bitmap fonts (filetype: .pk)

  1. {C:/Program Files/MiKTeX 2.9/fonts/enc/dvips/cm-super/cm-super-t1.enc} <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fo
  2. nts\pk\ljfour\public\concrete\dpi600\ccr5.pk>{C:/Program Files/MiKTeX 2.9/fonts/enc/dvips/lm/lm-rmtt.enc} <C:\Users\matt
  3. lorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concmath\dpi600\xccmi5.pk> <C:\Users\mattlorig\AppData\Local\MiKTe
  4. X\2.9\fonts\pk\ljfour\public\concmath\dpi600\xccex10.pk> <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\pu
  5. blic\concmath\dpi600\xccsy7.pk> <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concmath\dpi600\xccm
  6. i7.pk> <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concmath\dpi600\xccsy10.pk> <C:\Users\mattlor
  7. ig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concrete\dpi600\ccr10.pk>{C:/Program Files/MiKTeX 2.9/fonts/enc/dvips
  8. /lm/lm-ec.enc} <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concmath\dpi600\xccsy6.pk> <C:\Users\
  9. mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concrete\dpi600\ccr7.pk> <C:\Users\mattlorig\AppData\Local\MiK
  10. TeX\2.9\fonts\pk\ljfour\public\concmath\dpi600\xccmi10.pk> <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\
  11. public\concmath\dpi600\xccsy9.pk> <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concmath\dpi600\xc
  12. cmi9.pk> <C:\Users\mattlorig\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\concrete\dpi600\ccr9> <C:\Users\mattlori
  13. g\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

Postby mattlorig » Wed Oct 28, 2015 12:15 am

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.


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: No registered users and 2 guests