From: Jan Nieuwenhuizen Date: Sun, 5 Nov 2000 11:54:08 +0000 (+0100) Subject: patch::: 1.3.103.jcn3: Re: LilyPond 1.3.103 X-Git-Tag: release/1.3.104~2 X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=commitdiff_plain;h=46bfe1acbea4a8c22817d6d650734ff92029c22e;p=lilypond.git patch::: 1.3.103.jcn3: Re: LilyPond 1.3.103 --- diff --git a/lily/time-signature.cc b/lily/time-signature.cc index 77cc1ab699..e6afe98bd2 100644 --- a/lily/time-signature.cc +++ b/lily/time-signature.cc @@ -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); } diff --git a/scm/font.scm b/scm/font.scm index 62fbcb8115..3d90f422dc 100644 --- a/scm/font.scm +++ b/scm/font.scm @@ -172,7 +172,9 @@ . ((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)))