lilypond-user
[Top][All Lists]
Advanced

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

Sans Font for Lilypond texts?


From: Dominic Neumann
Subject: Sans Font for Lilypond texts?
Date: Fri, 14 Sep 2007 10:12:53 +0200

Hi,

I want to try to have all my lyrics typeset in a Sans font. Therefor
I´ve used a snippet from LSR
(http://lsr.dsi.unimi.it/LSR/Snippet?id=221):

%%% BEGIN OF SNIPPET %%%
\paper {
  myStaffSize = #20

  #(define fonts
    (make-pango-font-tree "Bitstream Vera Sans"
                          "Nimbus Sans"
                          "Luxi Mono"
     (/ myStaffSize 20)))
}
%%% END OF SNIPPET %%%

I substituted Times New Roman with Bitstream Vera Sans what isn´t a
very good way, I think.
When producing lilypond-output directly with lilypond this works quite
good, but together with lilypond-book the layout is very bad: the
barlines and stems are smaller than they should be to suit the size of
the noteheads.

I produced two simple examples to show what I did:

%%%% BEGIN OF PURE LILYPOND-FILE%%%%
\version "2.10.29"

\paper {
    myStaffSize = #20

    #(define fonts
        (make-pango-font-tree "Bitstream Vera Sans"
                          "Nimbus Sans"
                          "Luxi Mono"
        (/ myStaffSize 20)))
}

verseOne = \lyricmode {
    \set stanza = "1. "
    test bla blub -- ber
    test bla blub -- ber
}

\score {
    {
        <<
        \relative c'' {
            \key d \major
            \time 2/4
            cis4 d | e fis
            cis4 d | e fis
            \bar "|."
        }
        \addlyrics { \verseOne }
        >>
    }
}

%%%% ENDOF PURE LILYPOND-FILE%%%%

%%%% BEGIN OF LYTEX-FILE %%%%
\documentclass{article}

\begin{document}

\lilypondfile[staffsize=11]{test.ly}

\end{document}
%%%% END OF LYTEX-FILE %%%%


As you see, I cannot change the Staffsize and everything belonging to
it from within the LyTeX-file. How can I achieve this in another way?
I hope there is a more straight-forward way ...

Thanks, Dominic

PS: It seems that the \sans command only works within \markup
commands. So I cannot say "\sans" at the beginning of the document to
make everything appear in a Sans font.

Attachment: purelilyfile.png
Description: PNG image

Attachment: lybookfile.png
Description: PNG image


reply via email to

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