[NTG-pdftex] [ pdftex-Bugs-509 ] invalid pdf created if font name contains space

noreply at sarovar.org noreply at sarovar.org
Thu Apr 13 22:39:33 CEST 2006

Bugs item #509, was opened at 2006-04-13 20:37
You can respond by visiting: 

Category: Fonts
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Tom Bishop (tbishop)
Assigned to: Hartmut Henkel (hhenkel)
Summary: invalid pdf created if font name contains space

Initial Comment:
pdftex 3.141592-1.30.4-2.2 runs the following code without 

\pdfmapline{+mssong4e <mssong.ttf <mssong4e.enc}
\font\testfont=mssong4e at 20pt

-- but the resulting pdf file can't be opened by Adobe Reader or 
GhostScript. GhostScript reports "Unknown operator: Song".

The pdf file includes "/BaseFont /FEVAQU+MS Song". Evidently, the 
problem is the space in "MS Song", because if I use a hex editor to 
replace the space with an underscore, then the pdf becomes OK.

The same font worked fine with earlier pdftex versions. It's a Chinese 
Unicode TrueType font, from Microsoft.

I haven't tried installing pdftex 1.30.6; is it possible that would fix the 
problem? I just re-installed TeX using i-Installer for Mac OS X; it still 
uses pdftex 1.30.4.

Here is the output of pdftex when running the test file:

This is pdfeTeX, Version 3.141592-1.30.4-2.2 (Web2C 7.5.5)
entering extended mode
(./test3.tex [1{/Users/tbishop/Library/texmf/fonts/map/pdftex/
}] )</usr/local/teTeX/share/texmf.tetex/fonts/type1/bluesky/cm/
Output written on test3.pdf (1 page, 5067 bytes).
Transcript written on test3.log.

Thanks in advance for any help!

Best wishes,

Tom Bishop (wenlin at wenlin.com)


>Comment By: Hartmut Henkel (hhenkel)
Date: 2006-04-13 22:39

Logged In: YES 

This mssong.ttf version seems to be buggy. Here is a
diagnostic printout from function ttf_read_name() in
writettf.c; these are all available entries from the "Naming

i=0 platform_id=1 encoding_id=0 name_id=0 name <(c)
Copyright ZHUHAI Stone Computerized typesetting system R&D
LTD., 1995-1996>
i=1 platform_id=1 encoding_id=0 name_id=1 name <MS Song>
i=2 platform_id=1 encoding_id=0 name_id=2 name <Regular>
i=3 platform_id=1 encoding_id=0 name_id=3 name <Microsoft:MS
i=4 platform_id=1 encoding_id=0 name_id=4 name <MS Song>
i=5 platform_id=1 encoding_id=0 name_id=5 name <Version 1.00>
i=6 platform_id=1 encoding_id=0 name_id=6 name <MS Song>
---> ttf_read_name <MS Song>

There is no usable PostScript name in: The TTF standard
tells that under name_id=6 there should be the Postscript
font, but here it is "MS Song" with a blank.

As long as the font does not contain a valid PostScript
name, i have no idea how to tweak this correctly...

Other clues anybody?

Regards, Hartmut


You can respond by visiting: 

More information about the ntg-pdftex mailing list