lilypond-user
[Top][All Lists]
Advanced

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

Re: Overriding header fonts in a template


From: tisimst
Subject: Re: Overriding header fonts in a template
Date: Thu, 2 Oct 2014 15:38:29 -0700 (PDT)

On Thu, Oct 2, 2014 at 4:16 PM, Jeff Harris [via Lilypond] <[hidden email]> wrote:
I am trying to modify header fonts for the requirement of a publisher.

I would rather not use text markup commands in the header, as it's not
simple to change multiple works at the same time.

I would much rather put the style changes in an external file, so they can
all be changed at the same time if requirements change. I'm using an
external file for paper size and margin, and staff size, so I would prefer
to put overrides in the same place.

Is it possible to put header font-name and font-size overrides in an
external file and how? Maybe some sort of lilypond css?

I tried this but the re-defining of title and other header data didn't work
for me.

\version "2.18.0"
%\header { %% remove header block to turn title into a variable
   title = "Song Title"
   ...
%}
... (\PartMusic and \PartWords definitions }
\header {
   title = \markup { \override #'(font-name . 'Nimbus')
            \title }
}
\score { \new ChoirStaff << ... >> }

Jeff,

Here are two ways to do this:

%%%%%%%%%%

"publisherCSS.ly"

%%%%%

\version "2.18.0"

\header {
  title = \markup { \override #'(font-name . 'Nimbus') \myTitle }
}

%%%%%%%%%%

"publisherScore.ly"

%%%%%

\version "2.18.0" 

myTitle = "Song Title" 
\include "publisherCSS.ly"     <--- must come AFTER myTitle definition

\PartMusic and \PartWords definitions 

\score { \new ChoirStaff << ... >> } 

%%%%%%%%%%

Or, have you tried modifying bookTitleMarkup? Here's how I would do it (this is just a slight modification to the default found in "titling-init.ly"):

%%%%%%%%%%

"publisherCSS.ly"

%%%%%

\version "2.18.0"

bookTitleMarkup = \markup {
  \override #'(baseline-skip . 3.5)
  \column {
    \fill-line { \fromproperty #'header:dedication }
    \override #'(baseline-skip . 3.5)
    \column {
      \fill-line {
        \huge \larger \larger \bold
\override #'(font-name . "Nimbus") <------ Added override here!
        \fromproperty #'header:title
      }
      \fill-line {
        \large \bold
        \fromproperty #'header:subtitle
      }
      \fill-line {
        \smaller \bold
        \fromproperty #'header:subsubtitle
      }
      \fill-line {
        \fromproperty #'header:poet
        { \large \bold \fromproperty #'header:instrument }
        \fromproperty #'header:composer
      }
      \fill-line {
        \fromproperty #'header:meter
        \fromproperty #'header:arranger
      }
    }
  }
}

%%%%%%%%%%

See if either of those work for you.

HTH,
Abraham


View this message in context: Re: Overriding header fonts in a template
Sent from the User mailing list archive at Nabble.com.

reply via email to

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