Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Most of PDF viewing software allows one to see documents properties, in particular, fonts used in them. Some viewers (e.g. Okular of KDE) even allow to extract such fonts to TTF files. I always wondered why names of fonts are often so weird - they contain prefixes. This holds for PDFs produced by PDFLaTeX, XeLateX, MS Word etc. Googling this subject reveals only information about font embedding, which is irrelevant to font naming.

Actually, two related questions arise from this:

  1. Is there any standard that a PDF producing application follows when it chooses font names?
  2. Is there any method to affect naming of fonts generated by LaTeX?

Below is a screenshot of a document properties window of Foxit Reader. Note that "EAPEGA+", "EAPHMM+" etc prefixes that some fonts have. PDF document properties, font view

EDIT: this thread partly answers to my second question: one can try to uncompress a PDF, then use find-and-replace to substitute font name string, and repack everything back to PDF.

share|improve this question
2  
Actually, font embedding is relevant to the naming. In the vast majority of cases, what is embedded is not the whole font but a subset of that font which includes what is actually used in the document. In some cases, several different "fonts" may be derived from a single original font. This happens if you use certain features of the microtype package, for example, which enable things like font expansion. So the programme cannot, typically, just use the name of the font, for example, since that would be non-unique and misleading. Don't know how it actually generates the names, though. –  cfr Jan 29 at 0:31
    
Hmm, I've never thought that microtype may affect this, thanks. Still, the strange similarity of naming used by all tools I've used is what's most intriguing: no tool, to my knowledge, embed hash sums, or sequential numbers. It's always AABBCCDD or smth alike. –  Grigory Rechistov Jan 29 at 0:48
    
It may be a standard set in the PDF spec i.e. this is how stuff which writes PDF files should proceed..., and this is what PDF viewers should expect to read.... The microtype features will increase the apparent number of fonts, though. (Which is why some features should be reserved for the production of stuff to print - so files are not unnecessarily large when downloaded etc.) –  cfr Jan 29 at 0:51

2 Answers 2

up vote 6 down vote accepted

The prefixes indicate – as @cfr has already pointed out in the comments (and also in her almost synchronous answer) – that the respective font is embedded only as a subset, ie. that only those glyphs are included that are actually used in the document. These prefixes are meant to prevent clashes between different subsets of the same font, and to allow merging them.

The standard that the PDF-producing application has to follow is Adobe's PDF spec, which says (in section 9.6.4, PDF 1.7):

For a font subset, the PostScript name of the font—the value of the font’s BaseFont entry and the font descriptor’s FontName entry— shall begin with a tag followed by a plus sign (+). The tag shall consist of exactly six uppercase letters; the choice of letters is arbitrary, but different subsets in the same PDF file shall have different tags.

The naming scheme is hard-coded in pdftex, so there is no way to change the font names, other than editing the PDF file itself, which is always quite risky. Also, many viewers (among them, Adobe Reader) will not display the prefix at all.

A final remark regarding microtype, as @cfr brought it up: In contrast to the prefix with subsetting, font expansion lead to having a suffix added to the name of the font which was indeed included multiple times with earlier versions of pdftex. However, this is no longer the case (since pdftex version 1.20), and the size increase of the PDF file with enabled font expansion is negligible.

share|improve this answer

I have no idea about question (2) but this is relevant to question (1) and too long for a comment, I think:

According to the PDF spec from Adobe (section 9.6.4):

For a font subset, the PostScript name of the font—the value of the font’s BaseFont entry and the font descriptor’s FontName entry— shall begin with a tag followed by a plus sign (+). The tag shall consist of exactly six uppercase letters; the choice of letters is arbitrary, but different subsets in the same PDF file shall have different tags.

EXAMPLE EOODIA+Poetica is the name of a subset of Poetica®, a Type 1 font.

So what you are seeing is due to the embedding of subsets. Note that TimesNewRoman does not have the prefix because it is not embedded but is rather using a system font. (If you did not have this font installed, your PDF viewer would show an alternative value for Actual Font and/or Actual Font Type depending on what you did have available and how substitutions are configured on your system.)

share|improve this answer
1  
What is shown depends clearly also on the PDF Viewer/Editor: I do see these tags neither with Adobe Reader nor with PDF-XChange Viewer (both in Windows) for a document, where the fonts are emmbedded as subsets (which is stated in the document properties). –  Speravir Jan 29 at 3:55
    
@Speravir I guess acroread filters the prefixes out before displaying them. That is, I take it the prefixes are still there and it is just slightly misleading the way it is displayed in the viewer. –  cfr Jan 29 at 4:01
    
I think so, I just wanted to add this. –  Speravir Jan 29 at 4:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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