|
From: | dfro |
Subject: | Re: Custom clef horizontal adjustment. |
Date: | Thu, 5 Jul 2018 22:54:57 -0400 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
David and Pierre,
Thank you for the suggestions. I appreciate you making a code example for me. I saw this method earlier in the LSR, but could not make sense of it at the time. Pierre, your example helps me to see the difference between the "\path" way of doing things and the "\markup \postscript" way of doing things. I have several questions that are arising as I play with the code and try to understand its behavior. The \path-like version shifts the glyph over 2 units from the postscript method. Is there a way to do some kind of 'translate' equivalent with the \path commands in Scheme? Do I need to do something like make a spreadsheet that recalculates all the numbers and then retype them; or, could some different Scheme code be added to move the glyph left or right without having to manually reenter the numbers? For example: Sudo-code: (moveto ( ... moveto, lineto, curveto, closepath commands.... )) (I am sure my noobiness is very apparent with this question!) I intend to make glyphs in FontForge or Inkscape and export them as an eps. If I just copy and past the postscript numbers into the \path-like code and then change the code: (ly:stencil-scale altoClef (* .4 mlt) (* .4 mlt))) To: (ly:stencil-scale altoClef (* .004 mlt) (* .004 mlt))) ... it does not compile and I get an error message. Why? (The postscript numbers with the .004 scale and the \path numbers with the .4 scale calculate to the same numbers.) Also, what is 'mlt' an abbreviation for? At my level of understanding, I see using a spreadsheet to translate the postscript numbers into \path numbers. Is there a better way of doing this? I am beginning to understand how Scheme functions work, but I wonder - What do these commands do?: (cons -0.1 5) (cons -5 5) I found out in 'Extending 1.1.4' that 'cons' is a Scheme way of creating value pairs. But, what parameters are they effecting? While playing with them I got the spacing of the glyph and the various barlines, notes, and time signature spacing to change, but I could not discover any logical pattern and it often caused note clashing. Also, how could one add the "filled #t" or "filled #f" property into the "altoClef = " Scheme function? The main question I am wondering is - How does LilyPond determine the size of a grob, and can it be configured manually? Can the leftmost or rightmost extent be configured? Or, is this the wrong way to think of things? For example, I notice that if I change the value in the code: (let* ((sz (ly:grob-property grob 'font-size 0)) so that the font is very large, then the notes will nicely nest inside the glyph and reestablish the same spacing. If I do the same kind of rescaling with the postscript way, it just expands over the notes. I appreciate any thoughts that anyone would enjoy sharing. I want to better understand this amazing program and make my manuscript writing process smoother. LilyPond is a work of art. Peace, David Froseth On 7/3/18 3:25 AM, Pierre Perol-Schneider wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |