[NTG-pdftex] Re: [tex-k] Dvips fix for font in EPSF improperly downloaded

Reinhard Kotucha reinhard.kotucha at web.de
Mon Jan 24 04:04:05 CET 2005

>>>>> "Tomas" == Tomas G Rokicki <rokicki at CS.Stanford.EDU> writes:

  > All your points are good, but I clain the "fix" is still an
  > improvement, and for that reason I am leaving it in there.

Yes.  It is definitely an improvement and should not be reversed.  It
seems that pdftex and dvips now behave similar, which also is an

And a quick fix isn't what I want if it has an impact on reliability.
But it is something one should keep in mind for future versions.

  > Perhaps I am naive, but if someone gives me an environment in
  > which there are multiple, and distinctly different, fonts, with
  > the same /FontName, I claim all bets are off.  I have encountered
  > this before and it's not a good situation.  At this time I simply
  > don't have a solution for a case like this.

You already live in such an environment.  At the university we had a
Kyocera printer with built in Bitstream fonts.  The /Courier had the
same problem as the IBM Courier, you couldn't distinguish between a
/leftquote and a /rightquote at normal sizes (10pt ... 12pt).  In this
case you have to download the font.  And you must always download
Courier if you want your document to be portable.

The nasty thing is that people use Courier for printing program code.
I prefer cmtt for things like that, anyway.  But some people still use

  > On the other hand, I do agree that it is better to rename the TeX
  > fonts if we will partially subset them.  I believe we should do
  > this (assuming technically we can make it work; I do not know that
  > we cannot, nor do I know of specific issues, but I would not be
  > surprised if this breaks something).

AFAIK, fonts in PostScript files are always global so that they cannot
be handled by save/restore or gsave/grestore, but I'm not sure.  If
this is true, then I do not see any other solution than to rename one
of them if an embedded font and a TeX font have the same /FontName but
are different.

To decide whether two fonts are different it's better to compare their
/UniqueIDs rather than their /FontNames.  Or probably both.

  > with to mess with.  I do know that I have had in the past
  > substantial problems with just changing the UniqueID of the font;
  > different interpreters were very unhappy with some of the changes
  > I made and I had to back them out.  But that's just a technical
  > issue.

That's strange.  From the viewpoint of a PS interpreter a UniqueID is
an arbitrary number.  

  > Another alternative is to run all included graphics through a
  > companion interpreter that's been configured to only collect
  > information on what characters and what fonts are used (probably
  > by redefining show and a few other operators).  But this is
  > another substantial undertaking.

Interesting point.  If you only want to use an external interpreter to
solve the problems we talked about, it's probably not worth the
effort.  This could be handled by an external program as well which
also fixes %%BoundingBox: (atend).

There are some limitations in dvips because it lacks a PS
interpreter.  For instance, I wrote a script which used dvips -E to
convert TeX formulas to eps and then converted them to png.  

I tried the same with graphics, but that failed because dvips doesn't
understand PostScript's scale, translate and rotate operators.

If you want to support something like that, it makes sense to think
about it.  As far as eps-files are concerned, an external program
wouldn't be bad.  

It could check whether the required font exists in texmf, and if this
is true, determine the subset, remove the font and add a comment to
the eps file which is similar to that what metapost inserts if the
prologues variable is not set.  


Reinhard Kotucha			              Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the ntg-pdftex mailing list