]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/all-font-metrics.cc
patch::: 1.3.57.jcn2
[lilypond.git] / lily / all-font-metrics.cc
index 88f46c07a905895610a1999f9a648f85657e7d37..20b5483348bb9049adef56175e6727f12b49077c 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
@@ -101,11 +101,14 @@ All_font_metrics::find_font (String name)
   if (f)
     return f;
 
-  warning (_f ("Can't find font: `%s'", name.ch_C ()));
+  warning (_f ("can't find font: `%s'", name.ch_C ()));
   warning (_ ("Loading default font"));
   
   String def_name = default_font_sz_;
-  SCM l = ly_eval_str ("(style-to-cmr \"default\")");
+  SCM l = scm_eval (gh_list (ly_symbol2scm ("style-to-cmr"),
+                           ly_str02scm ("default"),
+                           SCM_UNDEFINED));
+  
   if (l != SCM_BOOL_F)
     def_name = ly_scm2string (gh_cdr (l));
 
@@ -117,8 +120,8 @@ All_font_metrics::find_font (String name)
   if (f)
     return f;
 
-  error (_f ("Can't find default font: `%s'", def_name.ch_C ()));
-  error (_f ("(search path: `%s'", search_path_.str ()));
+  error (_f ("can't find default font: `%s'", def_name.ch_C ()));
+  error (_f ("(search path: `%s')", search_path_.str ()));
   error (_ ("Giving up"));
 
   return 0;
@@ -148,5 +151,8 @@ All_font_metrics::font_descriptions () const
 
 
 
-#include "ly-smobs.icc"
-IMPLEMENT_SMOBS(Font_metric);
+Font_metric*
+find_font (String name)
+{
+  return   all_fonts_global_p->find_font (name);
+}