lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ghostscript 9.56.1 in lilypond 2.23.14 no longer finds font Helvetic


From: Jean Abou Samra
Subject: Re: ghostscript 9.56.1 in lilypond 2.23.14 no longer finds font Helvetica-Bold, but gs in 2.22.1 did
Date: Tue, 8 Nov 2022 07:58:41 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1

Le 08/11/2022 à 06:59, Jeff Olson a écrit :

Excellent!  Thank you three times for your examples and patient explanations!

So part of the trick is discovering which lilypond font-name to specify in order to embed the desired font in lilypond's postscript.

My target is /Helvetica-Bold in postscript, and the wikipedia article on Ghostscript indicates that "Nimbus Sans L" is the proper substitute for Helvetica. So I followed your pattern and used font-name "Nimbus Sans L", but (surprise 1) the generated postscript font  was /TeXGyreHeros-Regular.   The Hello World output looked like Helvetica but was not bold, so I specified \bold "abcxyz", but (surprise 2) that didn't change abcxyz to bold and still used font /TeXGyreHeros-Regular.  So font-name "Nimbus Sans L" does not appear to have a bold type?

Similar thing (surprise 3) with font-name "Nimbus Sans": adding \bold had no effect on abcxyz and the postscript font was still /NimbusSans-Regular.  Here's the code I used:

\markup
\override #'(font-name . "Nimbus Sans")
\abs-fontsize #20
\bold
"abcxyz"

Not knowing how to guess the right font-name, I removed the override and just did \sans \bold:

\markup
\abs-fontsize #20
\sans \bold
"ABCDEFG#b in ly \sans \bold"

That of course produced output in sans bold and the postscript font it embedded was /NimbusSans-Bold.  I guess surprise 4 is that lilypond knows about postscript font /NimbusSans-Bold but won't generate it when \bold is specified with font-name  "Nimbus Sans".

As a check, removing the \bold and doing just \sans does indeed revert to /NimbusSans-Regular (no surprise).

So I can get my postscript to run with /NimbusSans-Bold instead of /Helvetica-Bold.  I just have to let lilypond pick the specific font family for abcxyz based on the generic family.  It works, but I'd feel more confident if I knew the right font-name to cause /NimbusSans-Bold to be loaded.

Am I still doing something wrong? (wouldn't be a surprise)





Surprise (1) is because, as far as I can see, LilyPond does not
ship with the variant "Nimbus Sans L". In the output of
"lilypond -dshow-available-fonts", only "Nimbus Mono PS
(Regular/Italic/Bold/BoldItalic)" and "Nimbus Sans
(Regular/Italic/Bold/BoldItalic)".

Surprises (2)-(4) happen because font-name is meant to be a
sledgehammer that overrides all font selection logic. In
particular, it makes \bold and \italic have no effect.
You have to use font-style instead.

By the way, what are you using PostScript code for more precisely?
It is not possible for you to switch to regular markup? (If
it's lots of paths, for example, that could be partly automated.)

Best,
Jean



Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]