]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/all-font-metrics.cc
(parse_symbol_list): Bugfix.
[lilypond.git] / lily / all-font-metrics.cc
index 8c4d40ffc8957d09ef8bc77643653dcc2824c4e8..abe7c742bb917bfcdf570feb7320bb3a89b18587 100644 (file)
@@ -43,12 +43,12 @@ All_font_metrics::All_font_metrics (String path)
 
 All_font_metrics::~All_font_metrics ()
 {
-  scm_gc_unprotect_object (afm_dict_->self_scm ());
-  scm_gc_unprotect_object (tfm_dict_->self_scm ());
-  scm_gc_unprotect_object (otf_dict_->self_scm ());
+  afm_dict_->unprotect ();
+  tfm_dict_->unprotect ();
+  otf_dict_->unprotect ();
 
 #if HAVE_PANGO_FT2
-  scm_gc_unprotect_object (pango_dict_->self_scm ());
+  pango_dict_->unprotect ();
   g_object_unref (pango_ft2_fontmap_);
 #endif
 }
@@ -76,20 +76,20 @@ All_font_metrics::find_pango_font (PangoFontDescription *description,
     {
       if (be_verbose_global)
        progress_indication ("[" + String (pango_fn));
-      
+
       Pango_font *pf = new Pango_font (pango_ft2_fontmap_,
                                       RIGHT,
                                       description,
                                       output_scale);
       val = pf->self_scm ();
       pango_dict_->set (key, val);
-      scm_gc_unprotect_object (val);
+      pf->unprotect ();
 
       if (be_verbose_global)
        progress_indication ("]");
 
       pf->description_ = scm_cons (SCM_BOOL_F,
-                                  scm_make_real (1.0));
+                                  scm_from_double (1.0));
     }
   g_free (pango_fn);
   return dynamic_cast<Pango_font *> (unsmob_metrics (val));
@@ -152,13 +152,13 @@ All_font_metrics::find_afm (String name)
       unsmob_metrics (val)->file_name_ = file_name;
 
       unsmob_metrics (val)->description_ = scm_cons (name_string,
-                                                    scm_make_real (1.0));
+                                                    scm_from_double (1.0));
 
       if (be_verbose_global)
        progress_indication ("]");
 
       afm_dict_->set (sname, val);
-      scm_gc_unprotect_object (val);
+      unsmob_metrics (val)->unprotect ();
 
       Adobe_font_metric *afm
        = dynamic_cast<Adobe_font_metric *> (unsmob_metrics (val));
@@ -222,9 +222,9 @@ All_font_metrics::find_otf (String name)
 
       unsmob_metrics (val)->file_name_ = file_name;
       unsmob_metrics (val)->description_ = scm_cons (name_string,
-                                                    scm_make_real (1.0));
+                                                    scm_from_double (1.0));
       otf_dict_->set (sname, val);
-      scm_gc_unprotect_object (val);
+      unsmob_metrics (val)->unprotect ();
     }
 
   return dynamic_cast<Open_type_font *> (unsmob_metrics (val));
@@ -264,9 +264,9 @@ All_font_metrics::find_tfm (String name)
 
       unsmob_metrics (val)->file_name_ = file_name;
       unsmob_metrics (val)->description_ = scm_cons (name_string,
-                                                    scm_make_real (1.0));
+                                                    scm_from_double (1.0));
       tfm_dict_->set (sname, val);
-      scm_gc_unprotect_object (val);
+      unsmob_metrics (val)->unprotect ();
     }
 
   return dynamic_cast<Tex_font_metric *> (unsmob_metrics (val));