Re: Temporary font change?

2015-02-19 Thread tisimst
Urs Liska wrote
 Am 19.02.2015 um 15:25 schrieb Klaus Blum:
 Dear LilyPond fellows,

 is there a way to temporarily change the notation font?
 For example, only some notes or one voice in a hand-written look like
 improviso?
 
 https://sites.google.com/site/tisimst/Home/custom-font-how-to#localized-font-changes
 ?

 I'm trying something like
 lt;http://lilypond.1069038.n5.nabble.com/file/n172083/Zwischenablage01.pnggt;

 by a code like this:

 % -
 \version 2.18.2
 
\new Staff {
  
{ c'1^Complete the following intervals:  f' dis'}
\\
{
  \override NoteHead.color   = #blue
  \override Accidental.color = #blue
  % do some magic here to change to improviso font
  a'1 a' ais'
}
  
}
\new Lyrics \lyricmode { major 6th1 major 3rd
 perf.
 5th }
 % -

 Thanks in advance for your thoughts,
 Klaus

Klaus,

Urs has pointed you to the easiest way (thanks, Urs!) and you can copy +
paste it right into your file. Here's an abridged version for a single font
(it should come AFTER you set the global staff size and set the global
document fonts), which might be better if you don't have all the others
installed:

  \paper {
#(add-music-fonts fonts 
'improviso  ; the font-family name
improviso   ; the music font
improviso   ; the brace font
feta-design-size-mapping  ; don't change this
(/ staff-height pt 20))  ; don't change this either
  }

You can also download a pre-made stylesheet that automatically has this
built-in from  fonts.openlilylib.org
http://fonts.openlilylib.org/docs.html#stylesheets  . Coincidentally, it
is also called font-register.ily like on the site that Urs pointed you to.
However, it attempts to make ALL the alternative fonts available to your
file, which may be a problem if they aren't all installed. 

Once that is in your LilyPond path and \include-ed in your file, then all
you have to do is

  \override [GROB].font-family = #'improviso

for any GROB you want to change to Improviso and back with

  \revert [GROB].font-family

Regards,
Abraham



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Temporary-font-change-tp172083p172086.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Temporary font change?

2015-02-19 Thread Klaus Blum
Hi Urs, 

thanks for your hint. Now it works:

% 

\version 2.19.15

#(define-public (add-notation-font fontnode name music-str brace-str factor)
   (begin
(add-music-fonts fontnode
  name music-str brace-str
  feta-design-size-mapping factor)
fontnode))

\paper {
  #(define notation-fonts
 (list
  (list 'improviso improviso improviso)
  (list 'emmentaler emmentaler emmentaler)
  ))

  #(begin
(for-each
 (lambda (tup)
   (add-notation-font fonts
 (car tup) ; font identifier
 (cadr tup) ; notation font
 (caddr tup) ; brace font
 (/ staff-height pt 20)))
 notation-fonts))
}

handOn = {
  \override NoteHead.color   = #blue
  \override Accidental.color = #blue
  \override NoteHead #'font-family = #'improviso
  \override Accidental #'font-family = #'improviso
}

handOff = {
  \revert NoteHead.color
  \revert Accidental.color
  \revert NoteHead #'font-family
  \revert Accidental #'font-family
}


  \new Staff {

  { c'1^Complete the following intervals:  f' dis'}
  \\
  { \handOn as'1 a' ais' }

  }
  \new Lyrics \lyricmode {minor 6th   1major 3rd   perf.
5th}


% 

P.S.: I had to change the version number to 2.19.15. 
2.18.2 returns an error message:
Wrong number of arguments to #procedure add-music-fonts (node name family
design-size-alist factor)
It seems that add-music-fonts now has different parameters.

P.P.S.: Does anybody know why the whole notes don't align as long as there
are two voices, separated by a double backslash?


Cheers, 
Klaus




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Temporary-font-change-tp172083p172089.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Temporary font change?

2015-02-19 Thread Klaus Blum
Hi Abraham, 

just discovered that I missed your answer. Thanks a lot for your tailor-made
version.

Klaus



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Temporary-font-change-tp172083p172090.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Temporary font change?

2015-02-19 Thread Urs Liska


Am 19.02.2015 um 15:25 schrieb Klaus Blum:

Dear LilyPond fellows,

is there a way to temporarily change the notation font?
For example, only some notes or one voice in a hand-written look like
improviso?


https://sites.google.com/site/tisimst/Home/custom-font-how-to#localized-font-changes
?


I'm trying something like
http://lilypond.1069038.n5.nabble.com/file/n172083/Zwischenablage01.png

by a code like this:

% -
\version 2.18.2

   \new Staff {
 
   { c'1^Complete the following intervals:  f' dis'}
   \\
   {
 \override NoteHead.color   = #blue
 \override Accidental.color = #blue
 % do some magic here to change to improviso font
 a'1 a' ais'
   }
 
   }
   \new Lyrics \lyricmode { major 6th1 major 3rd perf.
5th }
% -

Thanks in advance for your thoughts,
Klaus




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Temporary-font-change-tp172083.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user