]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.103.jcn3: Re: LilyPond 1.3.103
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 5 Nov 2000 11:54:08 +0000 (12:54 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 5 Nov 2000 11:54:08 +0000 (12:54 +0100)
lily/time-signature.cc
scm/font.scm

index 77cc1ab69915e0b4845c96420bb7df1e19b8d99e..e6afe98bd224321c2b328c201673f6be3aa20da1 100644 (file)
@@ -50,24 +50,36 @@ Time_signature::brew_molecule (SCM smob)
 Molecule
 Time_signature::special_time_signature (Score_element*me, String s, int n, int d)
 {
-  // First guess: s contains only the signature style
-  String symbolname = "timesig-" + s + to_str (n) + "/" + to_str (d);
+  /*
+    Randomly probing the font sucks?
+  */
+  
+  SCM alist_chain = Font_interface::font_alist_chain (me);
+  
+  SCM style_chain =
+    Font_interface::add_style (me, ly_symbol2scm ("timesig-symbol"),
+                              alist_chain);
+
+  Font_metric *feta = Font_interface::get_font (me, style_chain);
 
   /*
-     Randomly probing the font sucks?
-   */
+    First guess: s contains only the signature style, append fraction.
+  */
+  String symbolname = "timesig-" + s + to_str (n) + "/" + to_str (d);
   
-  Molecule m = Font_interface::get_default_font (me)->find_by_name (symbolname);
+  Molecule m = feta->find_by_name (symbolname);
   if (!m.empty_b()) 
     return m;
 
-  // Second guess: s contains the full signature name
-  m = Font_interface::get_default_font (me)->find_by_name ("timesig-"+s);
+  /*
+    Second guess: s contains the full signature name
+  */
+  m = feta->find_by_name ("timesig-" + s);
   if (!m.empty_b ()) 
     return m;
 
   // Resort to default layout with numbers
-  return time_signature (me, n,d);
+  return time_signature (me, n, d);
 }
 
 
index 62fbcb8115b7350bfb6c84ee0ae0b79c5dd0a145..3d90f422dc5df2fcc33197cf0a31b8867c8f1f0d 100644 (file)
      . ((finger . ((font-family . number) (font-relative-size . -3)))
        (volta . ((font-family . number) (font-relative-size . -2)))
        (tuplet . ((font-family . roman) (font-shape . italic) (font-relative-size . -1)))
-       (timesig . ((font-family .  number) (font-relative-size . 0)))
+
+       (timesig . ((font-family . number) (font-relative-size . 0)))
+       (timesig-symbol . ((font-family . music) (font-relative-size . 0)))
        
        (mmrest . ((font-family . number) (font-relative-size . 1)))
        (mmrest-symbol . ((font-family . music) (font-relative-size . 0)))