I finally got it working!

For future reference, the problem was that I could not make ghostscript use the 
exported font files from lilypond. I got it working by symlinking from one of 
the hardcoded font search paths (/usr/local/share/ghostscript) into the font 
export directory.

Also I use pdfcrop in my chain and for the files produced with 
--pspdfopt=TeX-GS, pdfcrop doesn’t work correctly. pdfcrop uses gs with 
-sDEVICE=bbox to get the bounding box of the pdf but it runs gs with -dSAFER 
which prevents gs from loading the exported font files. I suspect it is because 
they are not the actual font files but only wrappers linking to the real font 
files.

The only way I could resolve that was to either patch pdfcrop to remove -dSAFER 
or to ”manually” point gs to the actual font files by placing their path in the 
environment before calling pdfcrop:

GS_FONTPATH=/Library/Fonts/:/Applications/LilyPond.app/Contents/Resources/share/lilypond/current/fonts/otf/
 pdfcrop myscore.pdf


If anyone has a cleaner solution I would be glad to hear about it!

Erik



> 27 sep. 2021 kl. 20:47 skrev Erik Ronström <e...@ompom.se>:
> 
>> That option was removed again, but as far as I understand [1] you can
>> get similar tunings with "--pspdfopt=".




Reply via email to