Gentoo Archives: gentoo-user

From: Hans-Werner Hilse <hilse@×××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Ghostscript - font path
Date: Thu, 22 Nov 2007 18:27:22
Message-Id: 20071122191922.01e8ff30.hilse@web.de
In Reply to: Re: [gentoo-user] Ghostscript - font path by Joseph
1 Hi,
2
3 On Thu, 22 Nov 2007 10:13:50 -0700
4 Joseph <syscon@×××××××××.com> wrote:
5
6 > >> "gs -h" gives me the following font path for Ghostscript
7 > >> Search path:
8 > >> [...]
9 > >> Where these paths are coming from?
10 > >
11 > >Compiled into the binary?
12 >
13 > Not a good solution but, it would be better if we input the path via a config file.
14
15 Of course, this is only the basic configuration. You can override this
16 by configuration file or even environment variable (so you can set it
17 up in your .bashrc). The environment variable is GS_FONTPATH. See the
18 use.html document you've already found, it should be explained there.
19 Also have a look at /usr/share/ghostcript/<ver>/lib/Fontmap.GS, but I
20 don't suggest editing it as it will get overwritten by updates. I'm not
21 sure ATM if there's a standard path for overrides in GS, maybe someone
22 else can comment about this.
23
24 By the way: the X server probably doesn't know of all fonts either.
25 Take into account that a lot of programs nowadays use fontconfig, which
26 is configured in /etc/fonts. Yes, this is a bit convoluted.
27
28 > >Yes, might happen. But it is common sense that you should embed all
29 > >needed fonts into the PDF anyway. For older versions of PDFs there was
30 > >an exception for the Base14 fonts, and those are (by means of
31 > >replacement versions) accessible from GS' own font store (the path you
32 > >said is present and works). You never know at a later point in time
33 > >whether you have the right font, with the right encoding: even if the
34 > >name matches you can't be sure.
35 >
36 > I think this is the clue.
37 > Well, if I generate the PDF file on Linux the fonts are embedded in
38 > every PDF document when I received the file from somebody else the
39 > fonts most of the time are not embedded.
40
41 Yeah, that's the culprit if you have to use other peoples' documents...
42
43 > I have one document I received (pdf file) it printed fine two weeks ago;
44 > when I try to re-printed it I can not, and I
45 > know it is a font problem: egsample when I run pdf2ps file.pdf I get:
46 > **** Warning: Fonts with Subtype = /TrueType should be embedded.
47 > But TimesNewRomanPSMT is not embedded.
48 > **** Warning: Fonts with Subtype = /TrueType should be embedded.
49 > But TimesNewRomanPS-BoldMT is not embedded.
50 > **** Warning: Fonts with Subtype = /TrueType should be embedded.
51 > But ArialMT is not embedded.
52
53 Ghostscript should mostly be able to recover from those warnings and
54 use replacement fonts here. You might also want to give acroread a try
55 (it has command line options to generate Postscript, IIRC) or pdftops
56 (from poppler/Xpdf).
57
58 > How can they configure their system on Windows so the fonts are embedded?
59
60 That's hard to tell, and certainly depends on the "production chain".
61 For most ways of generating PDF on Windows, there is a configuration
62 option where it is to be expected. I.e. in the printer settings for a
63 PDF-printer style generator, in the "save as" options for programs
64 saving to PDF natively and so on.
65
66 > What puzzle me is that this document printed fine two weeks ago
67 > and all of a sudden I'm getting an error so I'm looking for a fault
68 > on my end.
69
70 Did you do an emerge -u by chance? (Of course, this isn't a fault, but
71 might be the cause, and then, I'd consider it a bug)
72
73 OTOH, I think most ESP specific code is now in the "main development
74 line" (ghostscript-gpl). You might want to try this out... The newest
75 release is 8.61 -- released yesterday -- and is not yet in portage.
76
77
78 -hwh
79 --
80 gentoo-user@g.o mailing list