Bug 689610 - Possible /NeverEmbed vs /AlwaysEmbed problem
Summary: Possible /NeverEmbed vs /AlwaysEmbed problem
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 8.61
Hardware: All All
: P4 minor
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-13 06:55 UTC by mjr19
Modified: 2009-03-26 06:48 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mjr19 2007-12-13 06:55:59 UTC
I'm not entirely sure whether the PDF writer, the documentation, or my
understanding is at fault here. However, given the trivial PostScript

%!
<< /NeverEmbed [ ] >> setdistillerparams
<< /AlwaysEmbed [ /Helvetica ] >> setdistillerparams
/Helvetica findfont
12 scalefont setfont
144 360 moveto
(Hello, PostScript world) show
showpage

I would expect ps2pdf to embed Helvetica. It doesn't. Also, following the
example in doc/Ps2pdf.htm, I would expect

gs -dBATCH -dSAFER -DNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out.pdf
-c '.setpdfwrite <</AlwaysEmbed [/Helvetica /Times-Roman]>> setdistillerparams'
-f hello.ps

to embed Helvetica. It doesn't. However

ps2pdf -dPDFSETTINGS=/printer hello.ps

does embed Helvetica, so all is not lost.

Could either the documentation be made clearer, or attempts to clear the
default NeverEmbed list be made more effective?

Michael Rutter
Comment 1 Hin-Tak Leung 2007-12-14 14:59:38 UTC
I think there is some special-casing regarding embedding with the standard 13
fonts (of which Helvetica is certainly one of them - Times is a bit different as
Times, Times-Roman are different fonts but made alias under some situations).
I am not sure about the exact implementation - you'll have to refer to the
distiller documentation - but I believe that Adobe Distiller does not embed
the standard 13 even if AlwaysEmbed is specified, and ghostscript probably follows
that.

This is just my thoughts - 
Comment 2 mjr19 2007-12-18 10:01:19 UTC
Whereas the PDF Reference Manual version 1.3 states, in 7.7.2, "[the base 14]
fonts, or their font metrics and suitable substitution fonts, are guaranteed to
be available to the Acrobat program", the PDF Reference, version 1.7, states, in
5.5.1 "Beginning with PDF 1.5, the special treatment given to the standard 14
fonts is deprecated. All fonts used in a PDF document should be represented
using a complete font descriptor. For backwards capability, viewer applications
must still provide the special treatment identified for the standard 14 fonts."

I actually think it is better not to embed these fonts -- it leads to rather
large file sizes. So I have no problem with lib/gs_pdfwr.ps setting

/NeverEmbed .standardfonts

by default. I am just confused that my attempts to over-ride this failed.

Michael
Comment 3 Ken Sharp 2009-03-26 06:48:14 UTC
Fixed in revision 9596, patch here:

http://ghostscript.com/pipermail/gs-cvs/2009-March/009170.html