[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BlueSky fonts and subfont (and FixFont, dvips & PDF)




   Berthold also writes:

   > Important point, as you say [when including the outline fonts in the
   > PostScript file for distiller] you want the fonts to be `unsubsetted'
   > Otherwise Distiller thinks they are complete fonts.  In your case they
   > would naturally be unsubsetted, but I have seen people produce bad
   > PDF by having partial fonts in the PS files (as opposed to none which
   > is by far the best - or complete fonts).

   Can you explain why this is bad PDF? I fear that in the past I may have
   made just such files, since my dvips is configured to always subset
   fonts (and include fonts not in the `Standard 35') and I've given that
   output to distiller. 

There are a few reasons.  The first is that you now cannot tell for
sure whether fonts are subsetted, since Distiller assumes what you
gave it is the complete font and unless it finds more stuff to strip
out it will mark it as such.  So if you look in `Document Info >
Fonts' it will not be listed as `embedded subset (Acrobat 3.0) or with
the random prefix (Acrobat 2.1).  

More seriously, you can run into problems where ATM is used to render
using one partial font and it thinks that is it and builds a cache on
that information, only to then see a different partial set in another
fonts.  Glyphs that occur in the second job but not the first may
disappear (it depends on the version of Acrobat - whether it has built
in ATM or uses the one installed on your machine etc.).  Also, I have seen
Acrobat Readers encoding problems aroused by such files.

   (I have distiller configured to always subset fonts
   too, which seems to result in some (useful) font renaming in this case,

You know that is not enough, right?  You *also* have to set MaxSubsetPct
to 99 or 100.  The default value is way too low to be useful.
In Acrobat 3.0 you can do this by fiddling with preferences or options.
In Acrobat 2.1 it required adding a file to the startup directory.
It will only subset if you use 10% or fewer (Acrobat 2.1) of the glyphs,
whicih often means that most fonts are included in complete form.

* This is important.  Many people think they are sending out files with
* partial fonts because they have checked the `subset fonts' check box.
* This is *not* enough.  You must also set MaxSubsetPct to a high value.
* I think this is discussed in places like http://www.YandY.com/pdf_from.pdf

   the subset of `cmmi10', which dvips 5.60a called `cmmi10', got called
   `AGPGAL+cmmi10' in the PDF file).

   > You don't see this problem when you produce output from DVIPS directly
   > using Type 1 fonts, since it forces the same fixed resolution onto
   > the Type 1 fonts by redefining their metrics.

   Ah. This explains things then; FixFont just uses:

     /DvipsFontMatrix [ 4 0 0 -4 0 0 ] def
     % ... and later ...
     /Fa { /CMR10 findfont 10.000 scalefont DvipsFontMatrix makefont setfont } def

   ...whereas dvips, when asked to use BlueSky fonts directly dvips utters:
     /rf{findfont dup length 1 add dict begin{1 index /FID ne 2
	 index /UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll
	 exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics
	 exch def dict begin Encoding{exch dup type /integertype ne{pop pop 1
	 sub dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div
	 def} ifelse}forall Metrics /Metrics currentdict end def[2 index
	 currentdict end definefont 3 -1 roll makefont /setfont load]cvx def}def
     % ... and later ...
     /Fa 141[33 2[42 2[23 6[37 46 12[85 14[62 22[42 2[23 46[{}9 83.022003
	 /CMR10 rf

   I guess I could fix things for FixFont so it too munged the metrics of
   the font, but my PostScript hacking isn't too great. Anyone else want to
   try it? Myself, while I can readily understand FixFont's incantation, it
   would probably take me a whole evening with the Red Book beside me to
   figure out how to extract the relevant parts of what dvips is doing.

Well, its a worthy project for someone stuck with a huge pile of legacy
documents.  For me, I rather produce clean PS and clean PDF from sratch :-)

Berthold Horn.