public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Michael <confabulate@kintzios.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] PHP, Haru, Ghostscript, Courier, and Nimbus
Date: Mon, 07 Nov 2022 12:27:38 +0000	[thread overview]
Message-ID: <2855628.e9J7NaK4W3@lenovo.localdomain> (raw)
In-Reply-To: <788d3dd5-3a73-c506-0455-1b958276c317@hanft.de>

[-- Attachment #1: Type: text/plain, Size: 1748 bytes --]

On Monday, 7 November 2022 11:56:34 GMT Matthias Hanft wrote:
> Hi,
> 
> since many years, I'm using PHP (currently 7.4) and the (self-
> compiled) Haru extension to produce PDF invoices on my server.
> 
> Internally, Haru seems to use Ghostscript, because:
> 
> - up to app-text/ghostscript-gpl-9.55.0-r2, when you look at the
>   PDF "properties" and then the "fonts" tab, there is "Courier",
>   "Helvetica" and "Helvetica-BoldOblique" - just as requested in
>   my PHP script like
>            $myPdf=new HaruDoc();
>            [...some page settings...]
>            $myFont=$myPdf->getFont('Courier', 'WinAnsiEncoding');
> 
> - from app-text/ghostscript-gpl-9.56.1-r3 on, everything looks like
>   before, but in the "properties/fonts" tab of the resulting PDF,
>   the fonts are now "NimbusMonoPS-Regular", "NimbusSands-BoldItalic"
>   and "NimbusSans-Regular".
> 
> I have already found this "translation" in the file
> /usr/share/ghostscript/9.56.1/Resource/Init/Fontmap.GS but there is
> obviously no relevant difference in that file between 9.55 and 9.56.
> 
> Some of my customers now seem to have trouble if the fonts in the
> PDF properties are named "Nimbus" instead of "Courier" - they just
> see some hieroglyphics when displaying the PDF.
> 
> Any idea that's going wrong here?
> 
> Thanks in advance,
> 
> -Matt

If your customers do not have Nimbus fonts available on their OS/PDF viewer, 
the viewer application will proceed using font substitution.  It will use 
whichever font family it thinks is the closest match, I would assume 
Helvetica.  Their application appears to get confused and substitute the 
Nimbus fonts with something else.  In any case, the solution to this is to 
embed the Nimbus fonts in the PDF file.

 

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-11-07 12:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-07 11:56 [gentoo-user] PHP, Haru, Ghostscript, Courier, and Nimbus Matthias Hanft
2022-11-07 12:27 ` Michael [this message]
2022-11-07 17:35   ` Matthias Hanft
2022-11-07 18:58     ` [gentoo-user] " Grant Edwards
2022-11-07 19:19       ` Matthias Hanft

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2855628.e9J7NaK4W3@lenovo.localdomain \
    --to=confabulate@kintzios.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox