lilypond-user
[Top][All Lists]
Advanced

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

Re: absolute font size issues


From: Marc Hohl
Subject: Re: absolute font size issues
Date: Wed, 12 Nov 2014 20:18:22 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

Am 12.11.2014 um 20:09 schrieb Marc Hohl:
Am 12.11.2014 um 13:35 schrieb Werner LEMBERG:

Well, I was about to answer, but somehow ...

:-)

I defined some \abs-... markup commands myself

Ha!  Where are they?  I guess this would have saved me many hours of
wading through obscure LilyPond Scheme code...

D'oh. A closer look into the sources of my old project dates 2011, and I
did not use \abs-... but \...-mm instead and gave all dimensions in
millimetres.

Anyway, here are the definitions, in case they might be useful for
somebody:
[..]

I forgot

#(define-markup-command (with-dimensions-mm layout props x y arg)
  (number-pair? number-pair? markup?)
  (let* ((m (interpret-markup layout props arg))
         (o-s (ly:output-def-lookup layout 'output-scale))
         (x1 (/ (car x) o-s))
         (x2 (/ (cdr x) o-s))
         (y1 (/ (car y) o-s))
         (y2 (/ (cdr y) o-s))
         (scaled-x (cons x1 x2))
         (scaled-y (cons y1 y2)))
    (ly:make-stencil (ly:stencil-expr m) scaled-x scaled-y)))

Marc






reply via email to

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