lilypond-devel
[Top][All Lists]
Advanced

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

RE: Fret Diagram markup


From: Han-Wen Nienhuys
Subject: RE: Fret Diagram markup
Date: Tue, 18 May 2004 23:02:46 +0200

address@hidden writes:
> > directory. Then one can use the script you 
> > wrote by adding just one line in the beginning of the file: 
> >  
> >   \include "fret-diagram-init.ly" 
> >  
> > By adding this line into "ly/declarations-init.ly", one may 
> > use the scripts even without any extra 
> > lines. 
> 
> I agree that this can be done, but it seems "improper" to me to include
> as a .ly file a whole chunk of nothing but scheme code.  To me, it would
> be better to get rid of the # in front of each #(define... and save the
> file as fret-diagram-markup.scm, then modify the (use-module ...
> statements wherever it is necessary.  But I can see that it would work
> as a .ly include.

Yep . it should be a .scm file.

> > I also tried  "grep -R fontify-text *" to the 
> > lilypond-source, but there was no hits. 
> > Where does the fontify-text function originate from? I should 
> > have missed something. 
> 
> In my distribution, fontify-text is found in scm/stencil.scm


here is one that will work for 2.3

        (define-public (fontify-text font-metric text)
          "Set TEXT with font FONT-METRIC, returning a stencil."
          (let* ((b  (ly:text-dimension font-metric text)))
            (ly:make-stencil
             `(text ,font-metric ,text) (car b) (cdr b))))



-- 

 Han-Wen Nienhuys   |   address@hidden   |   http://www.xs4all.nl/~hanwen 





reply via email to

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