On 2018-07-09 01:54, Torsten Hämmerle wrote:
In other words: the object's individual font-size property is getting in the
way when using the \magnify command and you'll have to take the current
font-size into account.

Just declare
  #:properties ((font-size 0))
in order to make the current font-size available and use
  (magstep font-size)
as a "fudge factor" instead of a hard-coded 1.125.

Thanks, Torsten. Based on this, I wonder if \scale would be the better choice to avoid what happens with \magnify:

%%%%
#(define-markup-command (fontsize-x-height layout props size arg) (number? markup?) (let* ((y-extent (ly:stencil-extent (interpret-markup layout props (markup "x")) Y)) (scale-factor ((lambda (x) (cons x x)) (/ size (cdr y-extent))))) (interpret-markup layout props #{ \markup \scale #scale-factor #arg #})))
%%%%

-- Aaron Hill

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to