Am 19.11.2016 um 23:50 schrieb Noeck: > Hi Mike, Andrew and David, > > thanks for your suggestions and help. My question was driven by the > intention to write a score in one file that can be shared and compiled > standalone and can optionally include my custom settings and fonts. > > This way, I could share it and it would probably look best with all the > extra settings, but if the fonts are not installed etc., the score will > still compile. > > So any solution that does not fit in the source file of the score > creates the kind of dependencies I want to avoid. > > I will have a look at the guile exceptions whether that is a solution.
I'm only now at the regular computer to comment. I don't think you need exceptions for the kind of request you need. If I'm not completely mistaken with your use case an if clause (or rather "if not") should be perfectly fine. However, I'm not sure how you can determine if a font is installed on your system. I assume it's possible to route the the font list shown by ly:font-config-display-fonts to a string and then check if given font is listed there. There's also ly:font-config-get-font-file, but that probably will just *not* really help you because fontconfig will *always* return a font file - either the right one or one that *it* thinks is the closest match. I got stuck there when I tried to integrate notation fonts installed as system fonts. I wanted to implement a fallback to Emmentaler, but it didn't work out for exactly that reason. It seems that fontconfig happily gives me Arial as a replacement font for Paganini ;-) But if someone can tell you how to get either the font file name for your specific font or the whole list of available fonts in a string you can determine if the right thing is in that string and then act accordingly. HTH Urs > Thanks, > Joram > > > _______________________________________________ > lilypond-user mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/lilypond-user _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
