lilypond-user
[Top][All Lists]
Advanced

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

Re: OpenType in LilyPond


From: Malte Meyn
Subject: Re: OpenType in LilyPond
Date: Sat, 26 Aug 2017 13:16:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0



Am 26.08.2017 um 11:28 schrieb Malte Meyn:
I just realised I can override grob the grob property font-features, not only markups. So I’ll adapt snippet 443 from the LSR for now (http://lsr.di.unimi.it/LSR/Item?id=443). In my use case I don’t have markups, headers, page numbers etc. so this solution should be sufficient.

In case someone is interested: here comes the adapted snippet (with usage example).

\version "2.19.64"

\paper {
  #(define fonts
     (set-global-fonts
      #:roman "Vollkorn"
      #:factor (/ staff-height pt 20)))
}

globalFontFeatures =
#(define-music-function (feat) (list?)
   #{
     \applyContext
     #(lambda (context)
        (let loop ((x all-grob-descriptions))
          (if (not (null? x))
              (let ((grob-name (caar x)))
(ly:context-pushpop-property context grob-name 'font-features feat)
                (loop (cdr x))))))
   #})

\layout {
  \context {
    \Score
    \globalFontFeatures #'("ss11" "dlig" "liga=0")
    % ss11: alternative “1”
    % dlig: st ligature
    % liga=0: disable standard ligatures (see instrument name)
  }
}

\relative {
  \set Staff.instrumentName = "Afl. in G"
  \repeat unfold 3 { R1*10 \break }
  \tempo 8 = 36
  \tuplet 13/8 { c'8-"sempre stacc." d e f g a b c d e f g a }
  b1 c-"½ Va. + Vl. 1"
}



reply via email to

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