[tex-k] Dvips fix for font in EPSF improperly downloaded

Reinhard Kotucha reinhard.kotucha at web.de
Sun Jan 23 00:52:56 CET 2005


I send a copy to ntg-pdftex at ntg.nl because I don't know how pdftex
deals with fonts in embedded PDF files.

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

  > I just submitted a fix for the problem where a document includes a
  > figure that uses a downloaded PostScript font, and that same font
  > is also used by the main document itself.  Dvips was partially
  > downloading the font in this case when it should have downloaded
  > the entire font.  It now does download the entire font.

If I understand you correctly, you want to put the entire font into
the output file if the /FontName of the font in the included eps-file
is the same as a font used by TeX (the /FontName in psfonts.map).

This will solve a few problems but not all.  The main problem is that
this solution assumes that a font in an embedded eps file and a font
in texmf with the same /FontName are identical.  But unfortunately we
cannot rely on this.

One example is /Courier.  http://ms25.ath.cx/courier.pdf shows the
difference between /leftquote in URW Courier and IBM Courier provided
by XFree86 (/usr/X11R6/lib/fonts/Type1/cour.pfa).

If you have problems downloading the file, let me know.

Both have "/FontName /Courier def" but they are totally different.

Another problem are the free URW fonts.  They are under GPL and
someone added cyrillic glyphs to the fonts.  The modified fonts are
distributed with ghostscript.  When I looked into them, they still
needed some refinement.  Walter Schmidt maintains the original URW
fonts on CTAN for exactly this reason.

Assume that someone creates an eps file using the cyrillic glyphs from
the gs fonts, does it really help if dvips include the entire font
from the the texmf tree (which does not have cyrillic glyphs)?

I think it's better not to touch eps files if possible.  People expect
that if they can be printed, they can be included into a TeX document.
In most cases you get better results if you replace an embedded font
by one provided by a TeX distribution but in some cases the result
might be not what people expect.  Checking the /UniqueID would
minimize the risk but for fonts under GPL I wouldn't even rely on
this.

Isn't it better to rename the TeX fonts (the fonts mentioned in
dvips.map)?  For instance, from psfonts.map:

bchb8r CharterBT-Bold "TeXBase1Encoding ReEncodeFont" <8r.enc <bchb8a.pfb

When loading a font, replace "/CharterBT-Bold" by "/bchb8a" and then
"/bchb8a findfont" instead of "/CharterBT-Bold findfont".

There are some legal problems as well.  If the user requires
subsetting in psfonts.map and for some reason the entire font is
included, there should at least be a warning message on screen.
Some font suppliers disallow distribution of files containing entire
fonts.

Your approach leads to smaller files.  I like this, of course.  Maybe
checking the /UniqueID is sufficient if we assume that people
providing modified fonts are clever enough to change the /UniqueID as
well.  I must admit that I don't know whether you already do this.

At the DANTE-2003 I had a discussion about problems like this with
Walter Schmidt.  At this time he was thinking about changing /FontName
in the free URW fonts on CTAN, but I disliked this approach because it
only solves problems with the fonts he maintains.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
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 tex-k mailing list