lilypond-user
[Top][All Lists]
Advanced

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

Re: cascading font selections?


From: Noeck
Subject: Re: cascading font selections?
Date: Mon, 26 Aug 2013 21:24:38 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130803 Thunderbird/17.0.8

>> Is there a way?
> 
> Unfortunately i don't know any.  This would be useful indeed.
> 
> JAnek

Wouldn't it be possible to write a scheme function that tests a list of
fonts whether the font is available and returns the first that is?

I don't know scheme and the font handling, so I can't do it. The
difficulty is probably how to check for the font (the "isInstalled"
function). If that was possible somehow (LP itself should somehow have a
check if the loading of a font fails, I suppose), it would be possible.
 Just to illustrate what I mean (in python):

def returnfont(fontlist):
   for font in fontlist:
     if isInstalled(font):
       return font
   print 'None of the fonts found!'
   return None

%usage like:
\override TextScript #'font-name =
    #returnfont("Lucida Console", "Monaco", "monospace")

Cheers,
Joram



reply via email to

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