2003-12-30 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ * 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.
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=1
-PATCH_LEVEL=3
-MY_PATCH_LEVEL=hwn1
+PATCH_LEVEL=4
+MY_PATCH_LEVEL=
\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 }
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
*/
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)
{
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"""))