lilypond-devel
[Top][All Lists]
Advanced

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

Re: making an `installed-font?' scheme function


From: Mark Polesky
Subject: Re: making an `installed-font?' scheme function
Date: Wed, 28 Aug 2013 13:55:30 -0700 (PDT)

David Kastrup wrote:
>> (if (installed-font? "Times New Roman")
>>   (markup (#:override '(font-name . "Times New Roman") expr))
>>   (markup expr))
>>
>> Even without a full solution, does anyone know a
>> direction to try with this?
>
> lilypond -dshow-available-fonts

Okay, I traced `show-available-fonts' to these lines in
font-config-scheme.cc:

   LY_DEFINE (ly_font_config_display_fonts, "ly:font-config-display-fonts", 0, 
0, 0,
              (),
              "Dump a list of all fonts visible to FontConfig.")
   {
     string str = display_list (NULL);
     str += display_config (NULL);

     progress_indication (str);

     return SCM_UNSPECIFIED;
   }

I think, all I need is a procedure like
`ly_font_config_get_fonts', exactly like the above except it
returns the list instead of displaying it.  I've never
learned C++, and something this simple would still take me
way too long to figure out on my own, so if one you could
just show me how it would be written, that would be awesome.

The other thing is... even with a little help from one of
you guys, I still won't be able to play around with this in
scheme-land while my `make/make install' is not working,
so...

Now, I *hate* being presumptuous and/or needy, but there are
at least four choices:

1) someone writes `ly_font_config_get_fonts' for me, adds it
to a local copy of font-config-scheme.cc, and using that
modification builds a 64-bit linux binary for me to
experiment with

2) someone writes `ly_font_config_get_fonts' for me, and
adds it to origin/master and I wait for the next release to
play with this

3) someone helps solve my build problem
http://lists.gnu.org/archive/html/bug-lilypond/2013-08/msg00143.html

4) nobody does anything

Thanks.
- Mark



reply via email to

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