views:

46

answers:

2

I am using a PDF converter library to embed fonts in a PDF file.

However there is a problem with some documents (japanese?) where the library cannot recognize a fontname correctly

/FontName /#82l#82r#82o#83S#83V#83b#83N

is this a valid name for a font ?

If yes - could someone give me a reference ?

A: 

It's called Shift JIS encoding ( http://en.wikipedia.org/wiki/Shift_JIS )

Take a look at this old mail from the Ghostscript mailing list for a list of font names: http://www.ghostscript.com/pipermail/gs-cvs/2002-April/001599.html

kb
it's pretty long, but Ctrl-F for "japanese-shift-jis"
kb
@kb: I am a real newbie regarding all this PDF and Font stuff. So this might be looking like a stupid question: are there some .ttf files which contains the mentioned font? Are there some tools to display fontnames from .ttf files ? (I have also .otf and .ttc files)
i'm afraid the only pdf parsing i've done remapped it to the standard windows fonts, however MS-Gothic is a commercial font i believe, but reading the textual identifier from fonts should be quite easy, try googling for the font fileformat, the name should be somewhere in the header easily parsed.
kb
A: 

I found a good and detailed explanation in the usenet (group comp.fonts)

... from user ken ...

see the PDF Reference, in 1.7 version, on page 57, 'Section 3.2.4 Name Objects':

"Beginning with PDF 1.2, any character except null (character code 0) may be included in a name by writing its 2-digit hexadecimal code, preceded by the number sign character (#); see implementation notes 3 and 4 in Appendix H.

This syntax is required to represent any of the delimiter or white-space characters or the number sign character itself; it is recommended but not required for characters whose codes are outside the range 33 (!) to 126 (~). The examples shown in Table 3.3 are valid literal names in PDF 1.2 and later. "

Edit: sorry, I don't know howto add a reference to the usenet article here