]> git.donarmstrong.com Git - lilypond.git/commitdiff
* mf/parmesan-clefs.mf: use # quantities for char_box
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 14 Sep 2003 12:26:06 +0000 (12:26 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 14 Sep 2003 12:26:06 +0000 (12:26 +0000)
offsets. Fixes overflow errors in the PFA.

* scm/new-markup.scm (strut-markup): change calling interface for
markup. Pass paper-def, not grob. This would \markup to be used
separately from grobs.

* lily/paper-def.cc: new function ly:paper-font; this function
replaces ly:get-font.

* lily/include/font-interface.hh (struct Font_interface): take
Paper_def iso. Grob for get_font().

15 files changed:
ChangeLog
input/test/time-signature-double.ly
lily/accidental.cc
lily/font-interface.cc
lily/grob-scheme.cc
lily/include/font-interface.hh
lily/include/paper-def.hh
lily/line-spanner.cc
lily/multi-measure-rest.cc
lily/paper-def.cc
lily/system-start-delimiter.cc
lily/text-item.cc
mf/parmesan-clefs.mf
scm/new-markup.scm
scripts/convert-ly.py

index d0090e04e1bf5bf17f3202fce17d2c193317beae..2f56d462cbbf6695321e7c600dc08e09ad7a50bd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2003-09-14  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * mf/parmesan-clefs.mf: use # quantities for char_box
+       offsets. Fixes overflow errors in the PFA. 
+
+       * scm/new-markup.scm (strut-markup): change calling interface for
+       markup. Pass paper-def, not grob. This would \markup to be used
+       separately from grobs.
+
+       * lily/paper-def.cc: new function ly:paper-font; this function
+       replaces ly:get-font.
+
+       * lily/include/font-interface.hh (struct Font_interface): take
+       Paper_def iso. Grob for get_font().
+
 2003-09-14  Graham Percival  <gperlist@shaw.ca>
 
        * Documentation/user/ tutorial.itely, refman.itely: add warning
index 3843ee2e97155cc258b6539d534045aa37e552f4..c2186c4cf296a12cc70f283ba0b6f4083bfebe8b 100644 (file)
@@ -10,27 +10,23 @@ explicitly, but can be faked by overriding formatting routines. "
 #(define (brew-double-time-sig grob)
   (define (frac-to-mol font frac)
     (let*
-       (
-        (d (fontify-text font (number->string (cdr frac))))
+       ((d (fontify-text font (number->string (cdr frac))))
         (n (fontify-text font (number->string (car frac))))
-        (c (ly:molecule-combine-at-edge d Y UP n 0.0))
-        )
+        (c (ly:molecule-combine-at-edge d Y UP n 0.0)) )
       (ly:molecule-align-to! c Y CENTER)
       c
     ))
   
   (let*
       
-    (
-     (chain (Font_interface::get_property_alist_chain grob))
-     (font (ly:get-font grob chain))
+    ((chain (Font_interface::get_property_alist_chain grob))
+     (font (ly:paper-get-font (ly:grob-get-paper grob) chain))
      (f1 '(6 . 4))
-     (musfont (ly:get-font grob (cons (list '(font-relative-size . 2) '(font-family . music)) chain)))
+     (musfont (ly:paper-get-font (ly:grob-get-paper grob) (cons (list '(font-relative-size . 2) '(font-family . music)) chain)))
      (plus (ly:molecule-translate-axis (ly:find-glyph-by-name musfont "scripts-stopped") 0.1 Y))
      (f2 '(3 . 2))
      (m1 (frac-to-mol font f1))
-     (m2 (frac-to-mol font f2))
-     )
+     (m2 (frac-to-mol font f2)) )
      
     
     (ly:molecule-combine-at-edge
index cbbbec7f2cade6daac4ffec37380a1d977f81d0a..6e5e4aeacec3e40ee348485a9f83f796ee35adbd 100644 (file)
@@ -184,7 +184,7 @@ Accidental_interface::brew_molecule (SCM smob)
                             (ly_symbol2scm ("font-relative-size"),
                              scm_int2num (-1)), SCM_EOL),
                    ac);
-      fm = Font_interface::get_font (me, ac);
+      fm = Font_interface::get_font (me->get_paper (), ac);
     }
   else
     fm = Font_interface::get_default_font (me);
index 45ff8a5a522e8da82940ecc0e82c1754eec4161d..d120bd2d0e220a4ffd24f116cadab67b2e9febda 100644 (file)
@@ -64,7 +64,7 @@ Font_interface::get_default_font (Grob*me)
   if (fm)
     return fm;
 
-  fm = get_font (me,  font_alist_chain (me));
+  fm = get_font (me->get_paper (),  font_alist_chain (me));
   me->set_grob_property ("font", fm->self_scm ());
   return fm;
 }
@@ -80,40 +80,16 @@ LY_DEFINE(ly_font_interface_get_default_font,
   return Font_interface::get_default_font (gr)->self_scm ();
 }
 
-LY_DEFINE(ly_font_interface_get_font,"ly:get-font", 2, 0, 0,
-         (SCM grob, SCM chain),
-         "Return a font metric satisfying the font-qualifiers in the alist chain @var{chain}.\n"
-"\n"
-"The font object represents the metric information of a font. Every font\n"
-"that is loaded into LilyPond can be accessed via Scheme. \n"
-"\n"
-"LilyPond only needs to know the dimension of glyph to be able to process\n"
-"them. This information is stored in font metric files. LilyPond can read\n"
-"two types of font-metrics: @TeX{} Font Metric files (TFM files) and\n"
-"Adobe Font Metric files (AFM files).  LilyPond will always try to load\n"
-"AFM files first since they are more versatile.\n"
-"\n"
-"An alist chain is a list of alists.\n")
-{
-  Grob * gr  = unsmob_grob (grob);
-  SCM_ASSERT_TYPE(gr, grob, SCM_ARG1, __FUNCTION__, "grob");
-
-  Font_metric*fm = Font_interface::get_font (gr, chain);
-  return fm->self_scm();
-}
-
 
 Font_metric *
-Font_interface::get_font (Grob *me, SCM chain)
+Font_interface::get_font (Paper_def *paper, SCM chain)
 {
   SCM name = ly_assoc_chain (ly_symbol2scm  ("font-name"), chain);
   
   if (!gh_pair_p (name) || !gh_string_p (gh_cdr (name)))
     {
-      Paper_def * p =  me->get_paper ();
-
-      SCM proc = p->lookup_variable (ly_symbol2scm ("properties-to-font"));
-      SCM fonts = p->lookup_variable (ly_symbol2scm ("fonts"));
+      SCM proc = paper->lookup_variable (ly_symbol2scm ("properties-to-font"));
+      SCM fonts = paper->lookup_variable (ly_symbol2scm ("fonts"));
 
       assert (gh_procedure_p (proc));
       name = gh_call2 (proc, fonts, chain);
@@ -126,7 +102,7 @@ Font_interface::get_font (Grob *me, SCM chain)
   Real rmag = gh_pair_p (mag) && gh_number_p (gh_cdr (mag))
     ? gh_scm2double (gh_cdr (mag)) : 1.0;
   
-  Font_metric *fm = me->get_paper ()->find_font (name, rmag);
+  Font_metric *fm = paper->find_font (name, rmag);
   return fm;
 }
 
index aa3acc99667012052695fe5465557759f8285408..eb49ddf153b81c038d9c63f79a06adf21b2496eb 100644 (file)
@@ -76,6 +76,19 @@ LY_DEFINE (ly_get_paper_var,"ly:get-paper-variable", 2, 0, 0,
   return sc->get_paper () ->lookup_variable (sym);
 }
 
+/* TODO: make difference between scaled and unscalead variable in
+   calling (i.e different funcs.) */
+LY_DEFINE (ly_grob_paper,"ly:grob-paper", 1, 0, 0,
+  (SCM grob),
+  "Get \\paper definition from a grob.")
+{
+  Grob * sc = unsmob_grob (grob);
+  SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
+
+  return sc->get_paper ()->self_scm ();
+}
+
+
 
 
 LY_DEFINE (ly_get_extent, "ly:get-extent", 3, 0, 0,
index 8c34e965055c7f941e796dd1156418b6a6bc6c97..1ebee16316073eff383a97914d674d87ad00cb7c 100644 (file)
@@ -16,7 +16,7 @@
 struct Font_interface
 {
   static SCM font_alist_chain (Grob*);
-  static Font_metric * get_font (Grob*, SCM alist_chain);
+  static Font_metric * get_font (Paper_def*, SCM alist_chain);
   static Font_metric * get_default_font (Grob*);
   static bool wild_compare (SCM field_val, SCM val);
   DECLARE_SCHEME_CALLBACK (properties_to_font_name, (SCM,SCM));
index 5decc401463b28c6bee8b24d15ac8094d4f81257..76d723a33e4666f569f7093e0eba2fe8e4a7af15 100644 (file)
@@ -76,4 +76,5 @@ public:
   friend int yyparse (void*);
 };
 
+Paper_def * unsmob_paper (SCM x);
 #endif // Paper_def_HH
index 03a201fa37f36b5280aa93cd56210aea7fe75db3..ee5c0e9c2c1f8fee0b6b2743f428d38de3c4546b 100644 (file)
@@ -168,7 +168,7 @@ Line_spanner::line_molecule (Grob *me, Real thick,
                                             ly_symbol2scm ("music")),
                                    SCM_UNDEFINED);
       
-      Font_metric *fm = Font_interface::get_font (me,
+      Font_metric *fm = Font_interface::get_font (me->get_paper (),
                                                  gh_cons (style_alist,
                                                           alist_chain));
       Molecule m = fm->find_by_name ("scripts-trill-element");
index 9d7d2c4285af38378a75e27558f1f86a4004d6bd..ad4c377b1f2a4263c4cd057abd49ab61abd0d142 100644 (file)
@@ -136,7 +136,7 @@ Multi_measure_rest::symbol_molecule (Grob *me, Real space)
 
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   Font_metric *musfont
-    = Font_interface::get_font (me,alist_chain);
+    = Font_interface::get_font (me->get_paper (), alist_chain);
 
   SCM sml = me->get_grob_property ("use-breve-rest");
   if (measures == 1)
index b3568b2dd0571a6086438407ebd90274ac955729..217e33752441eb1f075f3347719d3bb4cf8928b4 100644 (file)
@@ -22,7 +22,6 @@
 #include "paper-outputter.hh"
 #include "ly-modules.hh"
 
-
 /*
   This is an almost empty thing. The only substantial thing this class
   handles, is scaling up and down to real-world dimensions (internally
@@ -153,3 +152,39 @@ Paper_def::font_descriptions ()const
     }
   return l;
 }
+
+/*
+  Font_interface should be reorganised?
+*/
+#include "font-interface.hh"
+
+
+LY_DEFINE(ly_paper_get_font,"ly:paper-get-font", 2, 0, 0,
+         (SCM paper, SCM chain),
+         "Return a font metric satisfying the font-qualifiers in the alist chain @var{chain}.\n"
+"\n"
+"The font object represents the metric information of a font. Every font\n"
+"that is loaded into LilyPond can be accessed via Scheme. \n"
+"\n"
+"LilyPond only needs to know the dimension of glyph to be able to process\n"
+"them. This information is stored in font metric files. LilyPond can read\n"
+"two types of font-metrics: @TeX{} Font Metric files (TFM files) and\n"
+"Adobe Font Metric files (AFM files).  LilyPond will always try to load\n"
+"AFM files first since they are more versatile.\n"
+"\n"
+"An alist chain is a list of alists, containing grob properties.\n")
+{
+  Paper_def *pap = unsmob_paper (paper);
+  SCM_ASSERT_TYPE(pap, paper, SCM_ARG1, __FUNCTION__, "paper definition");
+  
+  Font_metric*fm = Font_interface::get_font (pap, chain);
+  return fm->self_scm();
+}
+
+Paper_def* 
+unsmob_paper (SCM x)
+{
+  return dynamic_cast<Paper_def*> (unsmob_music_output_def (x));
+}
+
+  
index 40243c6a8aa99a0f176fcfc36aea8c940dce3029..dca2d8d27be4211e46b1eaa577ead701e1f316af 100644 (file)
@@ -152,7 +152,7 @@ System_start_delimiter::staff_brace (Grob*me, Real y)
   SCM sz = gh_cons (ly_symbol2scm ("font-relative-size"), ly_symbol2scm ("*"));
   
   SCM alist = scm_list_n (fam, sz, SCM_UNDEFINED);
-  fm = Font_interface::get_font (me, scm_list_n (alist, SCM_UNDEFINED));
+  fm = Font_interface::get_font (me->get_paper (), scm_list_n (alist, SCM_UNDEFINED));
   
 
   int lo = 0;
index 0bf318708eff267e93cb7d607c387d5cda4b4cdf..f695a06f501fac153602d219a42b1f7521e311c4 100644 (file)
 #include "text-item.hh"
 #include "font-interface.hh"
 #include "virtual-font-metric.hh"
-
+#include "paper-def.hh"
 
 
 MAKE_SCHEME_CALLBACK(Text_item,interpret_markup,3);
 SCM
-Text_item::interpret_markup (SCM grob, SCM props, SCM markup)
+Text_item::interpret_markup (SCM paper, SCM props, SCM markup)
 {
   if (gh_string_p (markup))
     {
-      Grob *me = unsmob_grob (grob);
-      Font_metric *fm = Font_interface::get_font (me, props);
+      Paper_def *pap = unsmob_paper (paper);
+      Font_metric *fm = Font_interface::get_font (pap, props);
   
       SCM list = scm_list_n (ly_symbol2scm ("text"), markup, SCM_UNDEFINED);
       
@@ -47,7 +47,7 @@ Text_item::interpret_markup (SCM grob, SCM props, SCM markup)
       if (!markup_p (markup))
        programming_error ("Markup head has no markup signature.");
       
-      return scm_apply_2 (func, grob, props, args);
+      return scm_apply_2 (func, paper, props, args);
     }
   else
     {
index 0cdf84899ac8ae4eac43df56d2f47c8744b5d7ba..e7c603e271fe275ca9b7960e5eb877462fc9b37c 100644 (file)
@@ -111,7 +111,7 @@ def draw_vaticana_fa_clef(expr exact_center, reduction) =
        draw zd -- ze;
 
        %right-handed puncta as in do clef
-       draw_vaticana_do_clef(exact_center + (0.55reduced_il, 0), reduction);
+       draw_vaticana_do_clef(exact_center + (0.55reduced_il#, 0), reduction);
 
        set_char_box(0 - xpart exact_center,
                     1.05reduced_il# + xpart exact_center,
@@ -228,7 +228,7 @@ def draw_medicaea_fa_clef(expr exact_center, reduction) =
        draw zc -- zd;
 
        %right-handed puncta as in do clef
-       draw_medicaea_do_clef(exact_center + (0.7reduced_il, 0), reduction);
+       draw_medicaea_do_clef(exact_center + (0.7reduced_il#, 0), reduction);
 
        set_char_box(0 - xpart exact_center,
                     1.7reduced_il# + xpart exact_center,
@@ -936,7 +936,7 @@ fet_endchar;
 
 def draw_hufnagel_do_fa_clef(expr exact_center, reduction) =
        draw_hufnagel_do_clef(exact_center, reduction);
-       draw_hufnagel_fa_clef(exact_center + (0, -2staff_space), reduction);
+       draw_hufnagel_fa_clef(exact_center + (0, -2staff_space#), reduction);
        set_char_box(0 - xpart exact_center,
                     1.20reduced_il# + xpart exact_center,
                     1.15reduced_il# + 2staff_space# - ypart exact_center,
index 8781a7304d89d14bc29eac71062f2bbe84b85720..1e585aa7ba40c39fc404ef4dd1637b57c5a0bc71 100644 (file)
@@ -1,4 +1,3 @@
-
 "
 Internally markup is stored as lists, whose head is a function.
 
@@ -52,8 +51,8 @@ for the reader.
 ;; syntax, description and example. 
 ;;
 
-(define-public (simple-markup grob props . rest)
-  (Text_item::interpret_markup grob props (car rest)))
+(define-public (simple-markup paper props . rest)
+  (Text_item::interpret_markup paper props (car rest)))
 
 (define-public (stack-molecule-line space molecules)
   (if (pair? molecules)
@@ -72,39 +71,39 @@ for the reader.
       '())
   )
 
-(define-public (line-markup grob props . rest)
+(define-public (line-markup paper props . rest)
   "A horizontal line of markups. Syntax:
 \\line << MARKUPS >>
 "
   
   (stack-molecule-line
    (cdr (chain-assoc 'word-space props))
-   (map (lambda (x) (interpret-markup grob props x)) (car rest)))
+   (map (lambda (x) (interpret-markup paper props x)) (car rest)))
   )
 
 
-(define-public (combine-markup grob props . rest)
+(define-public (combine-markup paper props . rest)
   (ly:molecule-add
-   (interpret-markup grob props (car rest))
-   (interpret-markup grob props (cadr rest))))
+   (interpret-markup paper props (car rest))
+   (interpret-markup paper props (cadr rest))))
   
 (define (font-markup qualifier value)
-  (lambda (grob props . rest)
-    (interpret-markup grob (cons (cons `(,qualifier . ,value) (car props)) (cdr props)) (car rest))
+  (lambda (paper props . rest)
+    (interpret-markup paper (cons (cons `(,qualifier . ,value) (car props)) (cdr props)) (car rest))
   
   ))
 
 
 (define-public (set-property-markup qualifier)
-  (lambda (grob props . rest  )
-    (interpret-markup grob
+  (lambda (paper props . rest  )
+    (interpret-markup paper
                      (cons (cons `(,qualifier . ,(car rest))
                                  (car props)) (cdr props))
                      (cadr rest))
     ))
 
-(define-public (finger-markup grob props . rest)
-  (interpret-markup grob
+(define-public (finger-markup paper props . rest)
+  (interpret-markup paper
                    (cons (list '(font-relative-size . -3)
                                '(font-family . number))
                                props)
@@ -140,13 +139,13 @@ for the reader.
 
 
 ;; TODO: baseline-skip should come from the font.
-(define-public (column-markup grob props . rest)
+(define-public (column-markup paper props . rest)
   (stack-lines
    -1 0.0 (cdr (chain-assoc 'baseline-skip props))
-   (map (lambda (x) (interpret-markup grob props x)) (car rest)))
+   (map (lambda (x) (interpret-markup paper props x)) (car rest)))
   )
 
-(define-public (dir-column-markup grob props . rest)
+(define-public (dir-column-markup paper props . rest)
   "Make a column of args, going up or down, depending on DIRECTION."
   (let*
       (
@@ -155,13 +154,13 @@ for the reader.
     (stack-lines
      (if (number? dir) dir -1)
      0.0 (cdr (chain-assoc 'baseline-skip props))
-     (map (lambda (x) (interpret-markup grob props x)) (car rest)))
+     (map (lambda (x) (interpret-markup paper props x)) (car rest)))
     ))
 
-(define-public (center-markup grob props . rest)
+(define-public (center-markup paper props . rest)
   (let*
     (
-     (mols (map (lambda (x) (interpret-markup grob props x)) (car rest)))
+     (mols (map (lambda (x) (interpret-markup paper props x)) (car rest)))
      (cmols (map (lambda (x) (ly:molecule-align-to! x X CENTER)) mols))
      )
     
@@ -170,58 +169,58 @@ for the reader.
      mols)
     ))
 
-(define-public (right-align-markup grob props . rest)
-  (let* ((m (interpret-markup grob props (car rest))))
+(define-public (right-align-markup paper props . rest)
+  (let* ((m (interpret-markup paper props (car rest))))
     (ly:molecule-align-to! m X RIGHT)
     m))
 
-(define-public (halign-markup grob props . rest)
+(define-public (halign-markup paper props . rest)
   "Set horizontal alignment. Syntax: haling A MARKUP. A=-1 is LEFT,
 A=1 is right, values in between vary alignment accordingly."
-  (let* ((m (interpret-markup grob props (cadr rest))))
+  (let* ((m (interpret-markup paper props (cadr rest))))
     (ly:molecule-align-to! m X (car rest))
     m))
 
-(define-public (left-align-markup grob props . rest)
-  (let* ((m (interpret-markup grob props (car rest))))
+(define-public (left-align-markup paper props . rest)
+  (let* ((m (interpret-markup paper props (car rest))))
     (ly:molecule-align-to! m X RIGHT)
     m))
 
-(define-public (musicglyph-markup grob props . rest)
+(define-public (musicglyph-markup paper props . rest)
   (ly:find-glyph-by-name
-   (ly:get-font grob (cons '((font-name . ()) (font-family . music)) props))
+   (ly:paper-get-font paper (cons '((font-name . ()) (font-family . music)) props))
    (car rest))
   )
 
 
-(define-public (lookup-markup grob props . rest)
+(define-public (lookup-markup paper props . rest)
   "Lookup a glyph by name."
   (ly:find-glyph-by-name
-   (ly:get-font grob props)
+   (ly:paper-get-font paper  props)
    (car rest))
   )
 
-(define-public (char-markup grob props . rest)
+(define-public (char-markup paper props . rest)
   "Syntax: \\char NUMBER. "
-  (ly:get-glyph  (ly:get-font grob props) (car rest))
+  (ly:get-glyph  (ly:paper-get-font paper props) (car rest))
   )
 
-(define-public (raise-markup grob props  . rest)
+(define-public (raise-markup paper props  . rest)
   "Syntax: \\raise AMOUNT MARKUP. "
   (ly:molecule-translate-axis (interpret-markup
-                              grob
+                              paper
                               props
                               (cadr rest))
                              (car rest) Y))
 
-(define-public (fraction-markup grob props . rest)
+(define-public (fraction-markup paper props . rest)
   "Make a fraction of two markups.
 
 Syntax: \\fraction MARKUP1 MARKUP2."
 
   (let*
-      ((m1 (interpret-markup grob props (car rest)))
-       (m2 (interpret-markup grob props (cadr rest))))
+      ((m1 (interpret-markup paper props (car rest)))
+       (m2 (interpret-markup paper props (cadr rest))))
 
     (ly:molecule-align-to! m1 X CENTER)
     (ly:molecule-align-to! m2 X CENTER)
@@ -242,7 +241,7 @@ Syntax: \\fraction MARKUP1 MARKUP2."
       )))
 
 
-(define-public (note-markup grob props . rest)
+(define-public (note-markup paper props . rest)
   "Syntax: \\note #LOG #DOTS #DIR.  By using fractional values
 for DIR, you can obtain longer or shorter stems."
  
@@ -251,7 +250,7 @@ for DIR, you can obtain longer or shorter stems."
        (log (car rest))
        (dot-count (cadr rest))
        (dir (caddr rest))
-       (font (ly:get-font grob (cons '((font-family .  music)) props)))
+       (font (ly:paper-get-font paper (cons '((font-family .  music)) props)))
        (stemlen (max 3 (- log 1)))
        (headgl
        (ly:find-glyph-by-name font (string-append "noteheads-" (number->string (min log 2)))))
@@ -318,73 +317,73 @@ for DIR, you can obtain longer or shorter stems."
     stemgl
     ))
 
-(define-public (normal-size-super-markup grob props . rest)
+(define-public (normal-size-super-markup paper props . rest)
   (ly:molecule-translate-axis (interpret-markup
-                              grob
+                              paper
                               props (car rest))
                              (* 0.5 (cdr (chain-assoc 'baseline-skip props)))
                              Y)
   )
 
-(define-public (super-markup grob props  . rest)
+(define-public (super-markup paper props  . rest)
   "Syntax: \\super MARKUP. "
   (ly:molecule-translate-axis (interpret-markup
-                              grob
+                              paper
                               (cons '((font-relative-size . -2)) props) (car rest))
                              (* 0.5 (cdr (chain-assoc 'baseline-skip props)))
                              Y)
   )
 
-(define-public (translate-markup grob props . rest)
+(define-public (translate-markup paper props . rest)
   "Syntax: \\translate OFFSET MARKUP. "
-  (ly:molecule-translate (interpret-markup  grob props (cadr rest))
+  (ly:molecule-translate (interpret-markup  paper props (cadr rest))
                         (car rest))
 
   )
 
-(define-public (sub-markup grob props  . rest)
+(define-public (sub-markup paper props  . rest)
   "Syntax: \\sub MARKUP."
   (ly:molecule-translate-axis (interpret-markup
-                              grob
+                              paper
                               (cons '((font-relative-size . -2)) props)
                               (car rest))
                              (* -0.5 (cdr (chain-assoc 'baseline-skip props)))
                              Y)
   )
 
-(define-public (normal-size-sub-markup grob props . rest)
+(define-public (normal-size-sub-markup paper props . rest)
   (ly:molecule-translate-axis (interpret-markup
-                              grob
+                              paper
                               props (car rest))
                              (* -0.5 (cdr (chain-assoc 'baseline-skip props)))
                              Y)
   )
 
-(define-public (hbracket-markup grob props . rest)
+(define-public (hbracket-markup paper props . rest)
   "Horizontal brackets around its single argument. Syntax \\hbracket MARKUP."  
   
   (let*
       (
        (th 0.1) ;; todo: take from GROB.
-       (m (interpret-markup grob props (car rest)))
+       (m (interpret-markup paper props (car rest)))
        )
 
     (bracketify-molecule m X th (* 2.5 th) th)  
 ))
 
-(define-public (bracket-markup grob props . rest)
+(define-public (bracket-markup paper props . rest)
   "Vertical brackets around its single argument. Syntax \\bracket MARKUP."  
   (let*
       (
        (th 0.1) ;; todo: take from GROB.
-       (m (interpret-markup grob props (car rest)))
+       (m (interpret-markup paper props (car rest)))
        )
 
     (bracketify-molecule m Y th (* 2.5 th) th)  
 ))
 
 ;; todo: fix negative space
-(define (hspace-markup grob props . rest)
+(define (hspace-markup paper props . rest)
   "Syntax: \\hspace NUMBER."
   (let*
       ((amount (car rest)))
@@ -393,17 +392,17 @@ for DIR, you can obtain longer or shorter stems."
        (ly:make-molecule "" (cons amount amount) '(-1 . 1)))
   ))
 
-(define-public (override-markup grob props . rest)
+(define-public (override-markup paper props . rest)
   "Tack the 1st arg in REST onto PROPS, e.g.
 
 \override #'(font-family . married) \"bla\"
 
 "
   
-  (interpret-markup grob (cons (list (car rest)) props)
+  (interpret-markup paper (cons (list (car rest)) props)
                    (cadr rest)))
 
-(define-public (smaller-markup  grob props . rest)
+(define-public (smaller-markup  paper props . rest)
   "Syntax: \\smaller MARKUP"
   (let*
       (
@@ -411,11 +410,11 @@ for DIR, you can obtain longer or shorter stems."
        (entry (cons 'font-relative-size (- fs 1)))
        )
     (interpret-markup
-     grob (cons (list entry) props)
+     paper (cons (list entry) props)
      (car rest))
     ))
 
-(define-public (bigger-markup  grob props . rest)
+(define-public (bigger-markup  paper props . rest)
   "Syntax: \\bigger MARKUP"
   (let*
       (
@@ -423,30 +422,30 @@ for DIR, you can obtain longer or shorter stems."
        (entry (cons 'font-relative-size (+ fs 1)))
        )
   (interpret-markup
-   grob (cons (list entry) props)
+   paper (cons (list entry) props)
    (car rest))
   ))
 
-(define-public (box-markup grob props . rest)
+(define-public (box-markup paper props . rest)
   "Syntax: \\box MARKUP"
   (let*
       (
        (th 0.1)
        (pad 0.2)
-       (m (interpret-markup grob props (car rest)))
+       (m (interpret-markup paper props (car rest)))
        )
     (box-molecule m th pad)
   ))
 
 
-(define-public (strut-markup grob props . rest)
+(define-public (strut-markup paper props . rest)
   "Syntax: \strut
 
  A box of the same height as the space.
 "
 
   (let*
-      ((m (Text_item::interpret_markup grob props " ")))
+      ((m (Text_item::interpret_markup paper props " ")))
 
     (ly:molecule-set-extent! m 0 '(1000 . -1000))
     m))
index 3b074dd7b2021249834608f3e685d84ebb8c8f8d..db608b90f4825efc992e8b5b01dbdc0ce36bb77a 100644 (file)
@@ -1510,6 +1510,18 @@ def conv (str):
 
 conversions.append (((1,9,5), conv, 'HaraKiriVerticalGroup -> RemoveEmptyVerticalGroup'))
 
+def conv (str):
+       if re.search ("ly:get-font", str):
+               sys.stderr.write (r"(ly:get-font foo ..)  has been replaced by" + \
+                                 " (ly:paper-get-font (ly:grob-get-paper foo) .. ).\n" +\
+                                 "please update manually.")
+               
+               raise FatalConversionError()
+       return str
+               
+
+conversions.append (((1,9,6), conv, 'ly:get-font deprecated.'))
+
 ################################
 #      END OF CONVERSIONS      
 ################################