lilypond-auto
[Top][All Lists]
Advanced

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

Re: [Lilypond-auto] Issue 3887 in lilypond: Using non-default font size


From: lilypond
Subject: Re: [Lilypond-auto] Issue 3887 in lilypond: Using non-default font size results in uneven
Date: Sun, 08 Jun 2014 07:53:21 +0000


Comment #4 on issue 3887 by address@hidden: Using non-default font size results in uneven
http://code.google.com/p/lilypond/issues/detail?id=3887

Karol,

Perhaps I spoke too soon; maybe this *is* a bug. My solution above really only works when the smaller-sized notes use shorter durations than the bigger-sized notes. This is a little complicated, so in an attempt to streamline the following examples, I'm defining the following function:

magnifyStaff =
#(define-music-function (parser location mag) (number?)
   (_i "Magnify the notation of @var{mus}, including the
staff-size, using @var{mag} as a size factor.  Stems, beams,
slurs, and ties are adjusted automatically.")
   #{
     \set Staff.fontSize = #(magnification->font-size mag)
     \override Staff.StaffSymbol.staff-space = #mag
   #})
_______________________________________________________________

So, in the following example, the spacing will be nice in the first beat, but too tight in the second beat:

\score {
  <<
    \new Staff \relative {
      c'8. c16
      \tuplet 5/4 { c16 c c c c }
    }
    \new Staff \with { \magnifyStaff 0.56 } \relative {
      \override Score.SpacingSpanner.spacing-increment = #(* 1.2 0.56)
      \tuplet 5/4 { c'16 c c c c }
      c8. c16
    }
  >>
}
_______________________________________________________________

By fastidiously overriding and reverting the spacing-increment property, one could achieve the correct spacing manually, but who wants to do this?:

\score {
  <<
    \new Staff \relative {
      c'8. c16
      \tuplet 5/4 { c16 c c c c }
    }
    \new Staff \with { \magnifyStaff 0.56 } \relative {
      \tuplet 5/4 {
        \override Score.SpacingSpanner.spacing-increment = #(* 1.2 0.56)
        c'16 c c c
        \newSpacingSection
        \revert Score.SpacingSpanner.spacing-increment
        c
      }
      c8. c16
    }
  >>
}
_______________________________________________________________

Presumably there's an algorithm we can derive from this, so that spacing-increment could be adjusted on the fly automatically, but I don't have time to tackle this right this moment. I'll try to get back to it though.

- Mark



Attachments:
        3887b.png  25.2 KB

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings



reply via email to

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