# “Metric (TFM) file not found” error only in TeXStudio under Mac OS X

I'm using Mac OS X, and fresh installation of TeX Live 2015 and TeXstudio. When I compile a tex-file with pdflatex command from TeXstudio I get the well-known error "Metric (TFM) file not found". The corresponding log-file says:

! Font T2A/cmr/m/n/10.95=larm1095 at 10.95pt not loadable: Metric (TFM) file no
t found.
<to be read again>
relax
l.44 \begin{abstract}

I wasn't able to read the size data for this font,
so I will ignore the font specification.
[Wizards can fix TFM files using TFtoPL/PLtoTF.]
You might try inserting a different font spec;
e.g., type I\font<same font id>=<substitute font name>'.


When I compile the same file with pdflatex from the terminal, I do not get this error, instead, it seems that TeX compiles the neccessary files by itself (I have «[1] [2] [3]…» thing on the screen). After compilation from the command line, this file can be compiled in TeXstudio without errors. However, when I use a little bit different fonts (e.g. try to compile different file with a different markup), I again get similar error in TeXstudio.

I have cm-super package installed. TeXstudio uses the same pdflatex command that I invoke from the command line.

All the solutions I was able to find assume that there's something wrong with the code or with the packages. In my case it seems that something wrong with TeXstudio because everything works fine from the command line.

• What do the logs say before the line you've posted? I'd be checking carefully for them calling different TeX systems. – Joseph Wright Sep 28 '15 at 13:09
• @JosephWright, they are the same in the two logs (from CLI and from the TeXstudio), so they give no clue about different TeX systems. Here are the full logs: gist.github.com/ischurov/6bd7b76784d4e924749a (command line) and gist.github.com/ischurov/2e78bb168fdb513a5451 (TeXstudio). – Ilya V. Schurov Sep 28 '15 at 13:56
• Do you input or include anything such that one might be picking up a different version of one of your files? Try (1) creating a minimal case and (2) adding \listfiles. The TeX Studio one is trying to use fonts the other never touches. So something different must be happening in terms of what it is being asked to process. – cfr Nov 24 '15 at 4:08

I had exactly the same problem and since I also had only Basic installation of TexLive installing texlive-collection-fonts (doh!) resolved the issue for me:

sudo tlmgr install collection-fontsrecommended collection-fontsextra

• I don't believe you. If you had exactly the same problem, why did everything compile for you OK at the command line without your installing these packages? – cfr Nov 24 '15 at 3:56
• this worked with me on Snow Leopard. Thanks. – Ahmed Laatabi Feb 6 '17 at 19:48

I never use this tlmgr before. And for work and install was needed to go to the root:

cd ~

then update the tlmgr:

sudo tlmgr update --self

and then install the fonts:

sudo tlmgr install collection-fontsrecommended collection-fontsextra`