Bug 689929 - /NeverEmbed /AlwaysEmbed options for TRUETYPE fonts
Summary: /NeverEmbed /AlwaysEmbed options for TRUETYPE fonts
Status: RESOLVED INVALID
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 8.62
Hardware: PC Windows 2000
: P4 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-01 06:12 UTC by Tolga
Modified: 2009-03-26 04:39 UTC (History)
2 users (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 Tolga 2008-07-01 06:12:10 UTC
Using pdfwrite output device in Ghostscript, truetype fonts are embedded in the
created pdf's by default. I agree that this is a convenient standard. But, when
you attempt at changing the default font embedding policy using /NeverEmbed or
/AlwaysEmbed switches, things are somewhat problematic.

For some fonts (Verdana, Garamond, Arial for example), you have full control
over font embedding. On the other hand, you cannot control the embedding options
for most of the other fonts. For example, consider 2 truetype fonts which are
available on Win32 platforms:
Times New Roman and Palatino Linotype


-c ".setpdfwrite << /NeverEmbed [ /Verdana ] >> setdistillerparams"


Since this works for Verdana and not for Times New Roman or Palatino Linotype, I
assumed that the problem was with the font names.I checked the names used by
Ghostscript, names used by Acrobat Distiller and tried every combination I could
think of:
TimesNewRoman, Times-New-Roman, Times_New_Roman, Times-Roman, TimesNewRomanPSMT,
TimesNewRoman-PSMT, TimesNewRomanPS etc.
Similar combinations for Palatino Linotype...

All of my attempts failed. I assume that this has nothing to do with the font
names, but rather a bug with Ghostscript.



p.s.
----
Times New Roman font in the postscript file to be distilled is the truetype
font. (generated by disabling font substitution in the pscript5.dll printer driver.)
Comment 1 Hin-Tak Leung 2009-01-20 15:26:07 UTC
Times is one of the standard 13, and Palatino is one of the standard 35; they
are probably treated specially, compared to other fonts?
Comment 2 Ken Sharp 2009-03-26 04:39:37 UTC
Tested the HEAD revision by adding the following line to fontmap.GS:

/TimesNewRomanPSMT (C:/Windows/Fonts/times.ttf) ; 

Then executing this PostScript:

%!
<</NeverEmbed [/TimesNewRomanPSMT] >> setdistillerparams
/TimesNewRomanPSMT 72 selectfont 72 72 moveto (a) show
showpage

This works correctly. Then added to fontmap.GS:

/Times-New-Roman /TimesNewRomanPSMT ;

and ran this PostScript:

%!
<</NeverEmbed [/Times-New-Roman] >> setdistillerparams
/Times-New-Roman 72 selectfont 72 72 moveto (a) show
showpage

This also (correctly) does not embed the font. 

The font name called for by the PostScript file must be correctly defined; if
you want to use 'Times New Roman' as the font name then you must define it
properly, eg if you want to use spaces:

<< /NeverEmbed [ (Times New Roman) cvn ] >>

Thanks to Leonardo for the investigation.