]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/font-size-engraver.cc
* lily/sequential-music.cc: remove file.
[lilypond.git] / lily / font-size-engraver.cc
index 39174d47d41bc74279bc41dc8c3f8a730a7a2c00..46672d0ac10f150cf0b685873af45b556d877da8 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 2001--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2001--2004  Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
@@ -13,7 +13,7 @@
 class Font_size_engraver : public Engraver
 {
   
-  TRANSLATOR_DECLARATIONS(Font_size_engraver);
+  TRANSLATOR_DECLARATIONS (Font_size_engraver);
 protected:
   virtual void acknowledge_grob (Grob_info gi);
 private:
@@ -33,20 +33,20 @@ Font_size_engraver::acknowledge_grob (Grob_info gi)
   /*
     We only want to process a grob once.
    */
-  if (gi.origin_trans_->daddy_trans_ != daddy_trans_)
+  if (gi.origin_trans_->context () != context ())
     return ;
   
-  if (gh_number_p (sz) && gh_scm2double (sz))
+  if (scm_is_number (sz) && scm_to_double (sz))
     {
-      Real font_size = gh_scm2double (sz);
+      Real font_size = scm_to_double (sz);
       
-      font_size +=  robust_scm2double (gi.grob_->get_grob_property ("font-size"), 0);
-      gi.grob_->set_grob_property ("font-size", gh_double2scm (font_size));
+      font_size +=  robust_scm2double (gi.grob_->get_property ("font-size"), 0);
+      gi.grob_->set_property ("font-size", scm_make_real (font_size));
     }
 }
 
 
-ENTER_DESCRIPTION(Font_size_engraver,
+ADD_TRANSLATOR (Font_size_engraver,
 /* descr */       "Puts fontSize into font-relative-size grob property.",
 /* creats*/       "",
 /* accepts */     "",