From cd062b1a25dd6a3fd3fa760aae5595b8f6ca4156 Mon Sep 17 00:00:00 2001
From: hanwen <hanwen>
Date: Wed, 8 Feb 2006 12:42:11 +0000
Subject: [PATCH] * input/sakura-sakura.ly: document how to override font.

* input/regression/font-family-override.ly:  doc -dshow-available-fonts
---
 ChangeLog                                | 12 ++++++++++++
 input/regression/font-family-override.ly | 12 ++++++++++++
 input/sakura-sakura.ly                   | 16 ++++++++++++++++
 lily/midi-item.cc                        | 10 +++++++++-
 lily/trill-spanner-engraver.cc           |  1 +
 ly/engraver-init.ly                      |  1 +
 scm/define-grobs.scm                     |  2 --
 scm/lily.scm                             | 15 ++++++++++++---
 scm/output-texstr.scm                    |  2 ++
 9 files changed, 65 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ee5560aad5..a2bb17dc68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-02-08  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+	* input/sakura-sakura.ly: document how to override font.
+
+	* input/regression/font-family-override.ly:  doc -dshow-available-fonts
+
+2006-02-07  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+	* lily/midi-item.cc (to_string): truncate time sig at 255 beats.
+
 2006-02-08  Jan Nieuwenhuizen  <janneke@gnu.org>
 
 	* scripts/convert-ly.py (lilypond_version_re_str): Move from
@@ -15,6 +25,8 @@
 
 2006-02-06  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+	* VERSION (PACKAGE_NAME): release 2.7.32
+
 	* Documentation/topdocs/NEWS.tely (Top): document new variable
 	naming.
 
diff --git a/input/regression/font-family-override.ly b/input/regression/font-family-override.ly
index ab2a3524f0..342ed6ab15 100644
--- a/input/regression/font-family-override.ly
+++ b/input/regression/font-family-override.ly
@@ -10,6 +10,18 @@
 \paper  {
   % change for other default global staff size. 
   myStaffSize = #20
+
+
+  %{
+
+  run
+
+      lilypond -dshow-available-fonts blabla
+
+  to show all fonts available in the process log.  
+  
+  %}
+
   
   #(define fonts
     (make-pango-font-tree "Times New Roman"
diff --git a/input/sakura-sakura.ly b/input/sakura-sakura.ly
index 2e0d812dc5..1714653a36 100644
--- a/input/sakura-sakura.ly
+++ b/input/sakura-sakura.ly
@@ -2,6 +2,7 @@
 
 \version "2.7.32"
 
+
 \header {
   title = "さくら さくら"
   subtitle = "(Sakura, sakura)"
@@ -24,6 +25,21 @@
       | d,4 e b'8[ a] f4 | e1 \bar "|."
     }
     \addlyrics {
+
+
+      %{
+
+      Try the following if the default font doesn't work for you,
+      run
+
+      lilypond -dshow-available-fonts blabla
+
+      this will show all fonts available to LilyPond, substitute
+      FAMILY-NAME below and uncomment
+      
+      %}
+      %% \override Lyrics . LyricText #'font-name = #"FAMILY-NAME"
+      
       さ く ら さ く ら
       の や ま も さ と も
       み わ た す か ぎ り
diff --git a/lily/midi-item.cc b/lily/midi-item.cc
index 34184b636a..23ab0b614f 100644
--- a/lily/midi-item.cc
+++ b/lily/midi-item.cc
@@ -216,9 +216,17 @@ Midi_time_signature::Midi_time_signature (Audio_time_signature *a)
 std::string
 Midi_time_signature::to_string () const
 {
-  int num = audio_->beats_;
+  int num = abs (audio_->beats_);
+  if (num > 255)
+    {
+      warning ("Time signature with more than 255 beats. Truncating");
+      num = 255;
+    }
+
   int den = audio_->one_beat_;
 
+
+  
   std::string str = "ff5804";
   str += String_convert::int2hex (num, 2, '0');
   str += String_convert::int2hex (intlog2 (den), 2, '0');
diff --git a/lily/trill-spanner-engraver.cc b/lily/trill-spanner-engraver.cc
index 2b72316660..4806758b00 100644
--- a/lily/trill-spanner-engraver.cc
+++ b/lily/trill-spanner-engraver.cc
@@ -144,6 +144,7 @@ Trill_spanner_engraver::finalize ()
       span_ = 0;
     }
 }
+
 ADD_ACKNOWLEDGER (Trill_spanner_engraver, note_column);
 ADD_TRANSLATOR (Trill_spanner_engraver,
 		/* doc */ "Create trill spanner from a Music.",
diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly
index a5b0b93fba..12208d9c10 100644
--- a/ly/engraver-init.ly
+++ b/ly/engraver-init.ly
@@ -451,6 +451,7 @@ AncientRemoveEmptyStaffContext = \context {
   \consists "Stanza_number_align_engraver"
   \consists "Bar_number_engraver"
   \consists "Tweak_engraver"
+  \consists "Parenthesis_engraver"
   
   \defaultchild "Staff"
 
diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm
index df1dd3d9a9..ffe24ab280 100644
--- a/scm/define-grobs.scm
+++ b/scm/define-grobs.scm
@@ -899,9 +899,7 @@
 	))
     (LyricText
      . (
-
 	(stencil . ,ly:text-interface::print)
-
 	(X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
 	(self-alignment-X . 0)
 	(word-space . 0.6)
diff --git a/scm/lily.scm b/scm/lily.scm
index 1f099b248c..43d1176ebb 100644
--- a/scm/lily.scm
+++ b/scm/lily.scm
@@ -37,7 +37,10 @@ similar to chord syntax")
 	      (ttf-verbosity 0
 			   "how much verbosity for TTF font embedding?")
 	      (debug-gc #f
-			"dump GC protection info"))
+			"dump GC protection info")
+	      (show-available-fonts #f
+				    "List  font names available.")
+	      )
 	    ))
 
 ;; FIXME: stray statement
@@ -103,8 +106,6 @@ similar to chord syntax")
     (if (ly:get-option 'verbose)
 	(ly:progress "]"))))
 
-(define-public TEX_STRING_HASHLIMIT 10000000)
-
 ;; Cygwin
 ;; #(CYGWIN_NT-5.1 Hostname 1.5.12(0.116/4/2) 2004-11-10 08:34 i686)
 ;;
@@ -351,6 +352,8 @@ The syntax is the same as `define*-public'."
 		   (string<? (car x) (car y)))))))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
 (define-public (lilypond-main files)
   "Entry point for LilyPond."
   
@@ -376,6 +379,12 @@ The syntax is the same as `define*-public'."
 
 (define-public (lilypond-all files)
 
+  (if (ly:get-option 'show-available-fonts)
+      (begin
+	(ly:font-config-display-fonts)
+	(exit 0)
+	))
+  
   (let* ((failed '())
 	 (handler (lambda (key failed-file)
 		    (set! failed (append (list failed-file) failed)))))
diff --git a/scm/output-texstr.scm b/scm/output-texstr.scm
index a7998d4528..62fe1547a4 100644
--- a/scm/output-texstr.scm
+++ b/scm/output-texstr.scm
@@ -26,6 +26,8 @@
   (if (string? what)
       what
       ""))
+
+(define TEX_STRING_HASHLIMIT 10000000)
 (define-public (text font str)
   (call-with-output-string
    (lambda (port)
-- 
2.39.5