From 0a8bcf3866937e5dda6ba3b2847566c24cb3dd37 Mon Sep 17 00:00:00 2001 From: hanwen Date: Tue, 30 Dec 2003 18:20:46 +0000 Subject: [PATCH] release commit --- ChangeLog | 3 +++ VERSION | 4 ++-- input/regression/mensural.ly | 1 - lily/note-head.cc | 18 +++++++++++------- lily/tfm.cc | 2 +- scripts/convert-ly.py | 3 +++ 6 files changed, 20 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index d57f00960c..ea894594f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2003-12-30 Han-Wen Nienhuys + * scripts/convert-ly.py (FatalConversionError.func): add rule for + deprecated #'ancient font family + * lily/mark-engraver.cc (process_music): only set rehearsalMark if it is a string or number. diff --git a/VERSION b/VERSION index 3ff2a68cfe..aa9226608c 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=1 -PATCH_LEVEL=3 -MY_PATCH_LEVEL=hwn1 +PATCH_LEVEL=4 +MY_PATCH_LEVEL= diff --git a/input/regression/mensural.ly b/input/regression/mensural.ly index 4e458b563f..15b08cf36c 100644 --- a/input/regression/mensural.ly +++ b/input/regression/mensural.ly @@ -9,7 +9,6 @@ both for up and down stems." \score {\notes { \context Voice { - \property Voice.NoteHead \set #'font-family = #'ancient \property Voice.NoteHead \override #'style = #'mensural \transpose c d'' { c4 c2 c8 c16 c16 c1 c\breve c\longa } \transpose c c' { c4 c2 c8 c16 c16 c1 c\breve c\longa } diff --git a/lily/note-head.cc b/lily/note-head.cc index d40d2fe12f..76eb2a6939 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -278,14 +278,18 @@ Note_head::stem_attachment_coordinate (Grob *me, Axis a) SCM scm_font_char = scm_call_2 (proc, log, style); String font_char = "noteheads-" + ly_scm2string (scm_font_char); - int k = fm->name_to_index (font_char); - Box b = fm->get_indexed_char (k); - Offset wxwy = fm->get_indexed_wxwy (k); - Interval v = b[a]; - if (!v.empty_b ()) - return 2 * (wxwy[a] - v.center()) / v.length (); - } + int k = fm->name_to_index (font_char) ; + if (k >= 0) + { + Box b = fm->get_indexed_char (k); + Offset wxwy = fm->get_indexed_wxwy (k); + Interval v = b[a]; + if (!v.empty_b ()) + return 2 * (wxwy[a] - v.center()) / v.length (); + } + } + /* Fallback */ diff --git a/lily/tfm.cc b/lily/tfm.cc index 1086ad1551..0233d68a04 100644 --- a/lily/tfm.cc +++ b/lily/tfm.cc @@ -76,7 +76,7 @@ static Tex_font_char_metric dummy_static_char_metric; Tex_font_char_metric const * Tex_font_metric::find_ascii (int ascii, bool warn) const { - if (ascii < ascii_to_metric_idx_.size () && ascii_to_metric_idx_[ascii] >= 0) + if (ascii >= 0 && ascii < ascii_to_metric_idx_.size () && ascii_to_metric_idx_[ascii] >= 0) return & char_metrics_[ascii_to_metric_idx_ [ascii]]; else if (warn) { diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index 2f8184eed7..b3b107fd1f 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -1607,6 +1607,9 @@ def conv (str): return "#'font-size = #%d" % (2*string.atoi (match.group (1))) str =re.sub (r"#'font-relative-size\s*=\s*#([0-9-]+)", func, str) + str =re.sub (r"#'font-family\s*=\s*#'ancient", + r"#'font-family = #'music", str) + return str conversions.append (((2,1,1), conv, """font-relative-size -> font-size""")) -- 2.39.5