lilypond-user
[Top][All Lists]
Advanced

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

Re: absolute font size issues


From: Werner LEMBERG
Subject: Re: absolute font size issues
Date: Wed, 12 Nov 2014 08:14:12 +0100 (CET)

> \markup { \abs-fontsize #200 {
>             \abs-baseline-skip #250 {
>               \column { A A } } } }

An alternative to `\abs-baseline-skip' is a scaling function
`pt-to-staff-space', see below.  While being more versatile, it's
probably more awkward to use...


    Werner


======================================================================


#(define-public (pt-to-staff-space size)
   "Convert from points to staff space units."

   ;; The value `output-scale' gives the size (in mm) of the staff space at
   ;; the global staff size.  By definition, the staff space for a staff
   ;; size of 20pt is 20pt / 4 = 5pt.
   (let* ((5pt (ly:pt 5))
          (output-scale (ly:output-def-lookup $defaultpaper 'output-scale 1))
          (factor (/ output-scale 5pt))
          (staff-space (* 5 factor)))
     (/ size staff-space)))


\header { tagline = ##f }
\paper { print-page-number = ##f }

#(set-global-staff-size 25)

\markup { \abs-fontsize #200 {
            \override #'(baseline-skip . 40) {
              \column { A A } } } }

\pageBreak

\markup { \abs-fontsize #200 {
            \override #(cons 'baseline-skip (pt-to-staff-space 250)) {
              \column { A A } } } }



reply via email to

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