Gentoo Archives: gentoo-user

From: Matthias Hanft <mh@×××××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] PHP, Haru, Ghostscript, Courier, and Nimbus
Date: Mon, 07 Nov 2022 11:56:47
Message-Id: 788d3dd5-3a73-c506-0455-1b958276c317@hanft.de
1 Hi,
2
3 since many years, I'm using PHP (currently 7.4) and the (self-
4 compiled) Haru extension to produce PDF invoices on my server.
5
6 Internally, Haru seems to use Ghostscript, because:
7
8 - up to app-text/ghostscript-gpl-9.55.0-r2, when you look at the
9 PDF "properties" and then the "fonts" tab, there is "Courier",
10 "Helvetica" and "Helvetica-BoldOblique" - just as requested in
11 my PHP script like
12 $myPdf=new HaruDoc();
13 [...some page settings...]
14 $myFont=$myPdf->getFont('Courier', 'WinAnsiEncoding');
15
16 - from app-text/ghostscript-gpl-9.56.1-r3 on, everything looks like
17 before, but in the "properties/fonts" tab of the resulting PDF,
18 the fonts are now "NimbusMonoPS-Regular", "NimbusSands-BoldItalic"
19 and "NimbusSans-Regular".
20
21 I have already found this "translation" in the file
22 /usr/share/ghostscript/9.56.1/Resource/Init/Fontmap.GS but there is
23 obviously no relevant difference in that file between 9.55 and 9.56.
24
25 Some of my customers now seem to have trouble if the fonts in the
26 PDF properties are named "Nimbus" instead of "Courier" - they just
27 see some hieroglyphics when displaying the PDF.
28
29 Any idea that's going wrong here?
30
31 Thanks in advance,
32
33 -Matt

Replies

Subject Author
Re: [gentoo-user] PHP, Haru, Ghostscript, Courier, and Nimbus Michael <confabulate@××××××××.com>