# How to find the exact location of Type 3 fonts in PDF?

While generating PDFs, we often ends up with some Type 3 fonts. We can find the existence of Type 3 fonts in a PDF by providing pdffonts <filename.pdf>. Also, can find the exact page by giving the following:

 for i in seq 1 1 \pdfinfo test.pdf|grep 'Pages'|cut -d: -f2|sed -e 's/ //g'\
do
echo Page $i; pdffonts -f$i -l \$i test.pdf|grep 'Type 3';
done


This will list the existence of Type 3 font in each page. My question is whether we can find the exact location in the page where the Type 3 font appear. Is there any easy method or open source program to achieve this? In some situation, we need to spend hours by trial and error to find the exact font which cause the trouble.

-
Disable anti-aliasing in the PDF viewer and look at the page with larger magnifications. Type 3 fonts are not scalable, sooner or later they will show its pixels/stairs. – Heiko Oberdiek Jul 9 '13 at 6:22
Is there any other way we can find this while compiling a LaTeX file using \tracingall or similar commands? – Jagath AR Jul 10 '13 at 11:20
\usepackage[loading]{tracefnt} tells you something about loaded font names (TFM) that might be helpful in finding. But LaTeX does not know anything about the type of the fonts (PK, Type 1, TTF, ...), because this is part of the output driver level. – Heiko Oberdiek Jul 10 '13 at 15:10
Thanks for this useful comments! – Jagath AR Jul 10 '13 at 15:47

Package tracefnt with option loading tells you something about loaded font names (TFM) that might be helpful in finding. But LaTeX does not know anything about the type of the fonts (PK, Type 1, TTF, ...), because this is part of the output driver level.

The following example even loads tracefnt before \documentclass in order to catch the standard font cmr10:

\RequirePackage[loading]{tracefnt}
\documentclass{article}
\usepackage[weather]{ifsym}
\pagestyle{empty}
\begin{document}
Weather: \FilledSunCloud
\end{document}


The relevant .log file entries are:

LaTeX Font Info:    External font cmr10 at10.0pt' loaded as
(Font)              OT1/cmr/m/n/10  on input line 64.

LaTeX Font Info:    External font ifwea10 at10.0pt' loaded as
(Font)              U/ifwea/m/n/10  on input line 10.


The TeX will look for cmr10.tfm and ifwea10.tfm for the LaTeX fonts OT1/cmr/m/n/10 and U/ifwea/m/n/10 (<encoding>/<family>/<series>/<shape>/<size>).

The the output driver will look for virtual fonts, that might contain mappings to other fonts for the used glyphs. And it will look up for map files, which actual font file (Type 1, TTF, PK, ...) it should use.

If pdfTeX is used in PDF mode, then it prints the used fonts at the end of the pdfTeX run:

<.../texmf-var/fonts/pk/ljfour/public/ifsym/ifwea10.600pk>
<.../texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>


Hopefully, this gives you some clues to identify the troubling fonts faster.

-