]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/font-size-engraver.cc
* lily/dots.cc (print): replace -
[lilypond.git] / lily / font-size-engraver.cc
index 7ef99111b45ce6634b0ff31ab65f237af9ca435f..46672d0ac10f150cf0b685873af45b556d877da8 100644 (file)
@@ -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 */     "",