[NTG-pdftex] [ pdftex-Bugs-809 ] Incorrect FontFlags for Symbol font (34 instead of 4)

noreply at sarovar.org noreply at sarovar.org
Wed Jun 20 15:14:10 CEST 2007

Bugs item #809, was opened at 2007-06-20 11:51
You can respond by visiting: 

>Category: Fonts
>Group: v1.40.3
>Status: Closed
>Resolution: Duplicate
Priority: 5
Submitted By: Till Tantau (tantau)
>Assigned to: Martin Schröder (oneiros)
Summary: Incorrect FontFlags for Symbol font (34 instead of 4)

Initial Comment:

with version 1.40.3 of pdftex I have the following problem: When the 
standard PDF-Font "Symbol" is used in the pdf-file, then the /Flags 
entry of the FontDescriptor is set to 34 rather than to 4.

This is incorrect and causes the resulting files to be displayed 
incorrectly by the Acrobat Reader.

To reproduce the problem, I use the following LaTeX-code:




\myfont SG


My pdftex.map is standard and contains the following line:

psyr Symbol

According to the pdftex manual, this should cause the /Flags entry of 
the font in the PDF-file to be set to 4 (which would be correct and 
which would be the Flags value of a Symbol font). However, on my 
system the resulting pdf file (which I attach) contains a /Flags entry of 
34 (which is incorrect here and which is the Flags value of a serif 
standard font).

I hope this report is reasonably clear...

Any help on this would be greatly appreciated,
Till Tantau


>Comment By: Martin Schröder (oneiros)
Date: 2007-06-20 15:14

Logged In: YES 

your bug report is a duplicate of #762 (see also #794); both
will be fixed in the next interim release.


Comment By: Till Tantau (tantau)
Date: 2007-06-20 14:24

Logged In: YES 

Hi yet again,

I now had a look at the code, namely at teh function write_fontdescriptor in 

Now, in that file it says

    if (!fd->ff_found && fd->fm->fd_flags == 4)
        pdf_puts("/Flags 34\n");        /* assumes a roman sans serif font */
        pdf_printf("/Flags %i\n", (int) fd->fm->fd_flags);

which obviously causes the problems.

Now, it is not quite clear to me how to solve this. In older versions of pdftex 
(1.30) the built-in fonts did not their own FontDescription object, so this 
problem did not arise. However, in pdftex 1.40 they do for some reason (it 
says in create_fontdictionary:

        /* builtin fonts still need the /Widths array and /FontDescriptor
         * (to avoid error 'font FOO contains bad /BBox')

I could not track this "contains bad /BBox" problem. According to the PDF-
Specification, a builtin font does not need a FontDescriptor.

Be that as it may, I think the the Flags entries of the buildin fonts should be 
correct (actually, they have to be correct, Acrobat does not render them 
otherwise). This means, at the very least, that write_fontdescriptor should 
treat Symbol and ZapfDingbats specially (namely setting the Flags to 4). 
However, the Flags should also be set correctly for, say, Helvetica, which is 
not a serif font and for Courier, which is monospaced and so on.

Best regards,


Comment By: Till Tantau (tantau)
Date: 2007-06-20 12:00

Logged In: YES 

Hello again,

I toyed around with this some more. It turns out that if I change the line in 
the pdftex.map file to

psyr Symbol 6

then the /Flags field in the resulting .pdf file is set to 6 (which is "not quite 
correct", but then the text is rendered correctly, at least).

Now, trying other values than 6, it seems that pdftex specifically replaces 
exactly the number 4 by 34, all other values are left as they are. I presume 
this was done at some time for some other font that is not a symbol font and 
whose font flags were missing/incorrect. However, this behaviour is a bit 
problematic for the Symbol font.

Best regards,


You can respond by visiting: 

More information about the ntg-pdftex mailing list