This MWE works in 2.22.1 but fails in
2.23.14 (running via Frescobaldi 3.1.1 on up-to-date Windows
10):
\version "2.22.1"
\markup {
\postscript #"
/Helvetica-Bold findfont
4 scalefont setfont
(Hello, World!) show
"
}
In 2.22 you successfully get "Hello,
World!" at top of page.
In 2.23 you get a warning that gs failed,
along with a red herring about (let ((book-handler ... yada
yada. See attachment Helvetica-error-Frescobaldi.txt.
To see why gs failed, I used a cygwin
window to run the gs that is packaged with 2.23.14 ('/c/Program
Files/LilyPond/lilypond-2.23.14/libexec/gs.exe') and added the
-dDEBUG option to the options that lilypond supplied.
The specific gs failure is
Error: /invalidfont in findfont
Operand stack:
Helvetica-Bold
See attachment
Helvetical-error-Ghostscript.txt for the full gs command and its
output.
Interestingly, saving the postscript
intermediate file from 2.22.1 (where Helvetica works) and
running the gs from 2.23.14 also failed with the same gs error.
Following advice from the NR on Fonts, I
ran font-config-display-fonts in both 2.22.1 and 2.23.14 and
neither output mentioned Helvetica. So that isn't how Helvetica
was found in 2.22.1.
And Helvetica is not a system font in
Window 10 (not in C:\Windows\Fonts) so I can't follow the NR to
do #(ly:font-config-add-font "path/to/font-file").
The only way that Helvetica was found in
2.21.1 must be that it was supplied in the ghostscript.
Indeed, even the ghostscript docs
(https://ghostscript.readthedocs.io/en/latest/Fonts.html) say it
includes "Times, Helvetica, Courier, Symbol, etc."
So, the gs packaged with 2.21.1 includes
Helvetica but the gs packaged with 2.23.14 apparently does not.
Wikipedia says that font "Nimbus Sans L"
is a metrical equivalent to Helvetica-Bold (per
https://en.wikipedia.org/wiki/Nimbus_Sans#Nimbus_Sans_L) and is
also included in Ghostscript:
"Although the characters are not exactly
the same, Nimbus Sans L has metrics almost identical to
Helvetica and Arial. Nimbus Sans L is one of the Ghostscript
fonts, a set of free alternatives to the 35 basic PostScript
fonts (which include Helvetica)."
And Nimbus Sans L is also listed in our NY
as part of our "sans" family.
But I have not found a way to specify
Nimbus Sans L (or other Nimbus San variations) in my postscript
findfont in my MWE.
Can someone explain (a) why Helvetical is
no longer in 2.23.14's gs and (b) the syntax for specifying
Nimbus Sans L properly in my MWE?
Thanks for wading through all this with
me. I've been on a very big lilypond project for 6 years now,
and it is so big I have to use the 64-bit version in 2.23 due to
memory usage. But the project also contains 2500+ lines of
postscript code for essential diagrams (like guitar fretboards
and piano keyboards) so right now I'm still stuck. Really need
Helvetica-Bold or its metrical equivalent to work in 2.23