Is there a way to get a list of all encoding/family/series/shape combinations that are actually used in a document that you have the sources of? You know, like the OT1/fvm/m/n strings you get when a particular font is missing.

This is important when you want to change to a commercial font and need to know what weights and variants you actually need to buy. Like: "Do I actually need the demi-bold small caps italics?"

And since many font changes are not done by hand with \emphs and whatnot, things can easily get a little confusing in a longer document.

  • Does the list of fonts in Acrobat Reader-> Document Properties->Fonts help? – percusse May 22 '12 at 22:18
  • @percusse No, not really. It usually doesn't contain shape and weight information. It's useful when I want to find out what font families are used but that at least I do know of my own documents ;) – Christian May 22 '12 at 22:22



to your document, your log file then has lots of stuff like

......\hbox(6.94444+1.94444)x0.0, glue set - 345.0fil
........\hbox(6.94444+1.94444)x345.0, glue set 290.04158fil
.........\OT1/cmr/m/n/10 G
.........\OT1/cmr/m/n/10 r
.........\OT1/cmr/m/n/10 e
.........\OT1/cmr/m/n/10 e

which you can then filter eg on a bash command line as

$ grep -o   "\\\\[A-Za-z0-9]*/[A-Za-z0-9]*/[A-Za-z0-9]*/[A-Za-z0-9]*/[0-9.]* " abc3.log | sort -u

That is search for all instances of strings of the right form sort them and remove duplicates, revealing I just used four fonts in my test document.

  • Thank you, that's exactly what I was searching for! Actually, grep -o "\\\\[A-Za-z0-9]*/[A-Za-z0-9]*/[A-Za-z0-9]*/[A-Za-z0-9]*" abc.log | sort -u will also only find font strings and already get rid of the different sizes so the output is much smaller and can be understood at a glance. grep -o "\\\\[A-Za-z0-9]*/[A-Za-z0-9]*/[A-Za-z0-9]*/[A-Za-z0-9]*/[0-9.]* " abc.log | grep -o "\\\\[A-Za-z0-9]*/[A-Za-z0-9]*/[A-Za-z0-9]*/[A-Za-z0-9]*" | sort -u for the paranoid. – Christian May 23 '12 at 9:12
  • Or \\, for some versions of grep, instead of \\\\ – egreg May 23 '12 at 12:08
  • 2
    @egreg I think it's always just two \ for grep the difference is the command line (which is why I mentioned bash) bash grabs one level of \-quoting before grep sees the string. – David Carlisle May 23 '12 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.