]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/all-font-metrics.cc
* flower/include/offset.hh (class Offset): new operator /=
[lilypond.git] / lily / all-font-metrics.cc
index bc21a30ea8c864dabe11590d09cda8153ebcfe4f..440e16ca66fc55002a11d3dfa2e2967ce89cd13a 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1999--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1999--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "all-font-metrics.hh"
@@ -62,7 +62,8 @@ All_font_metrics::All_font_metrics (All_font_metrics const &)
 Pango_font *
 All_font_metrics::find_pango_font (PangoFontDescription *description,
                                   Real magnification,
-                                  Real output_scale)
+                                  Real output_scale
+                                  )
 {
   pango_font_description_set_size (description,
                                   gint (magnification *
@@ -76,11 +77,12 @@ 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);
+                                      output_scale
+                                      );
+      
       val = pf->self_scm ();
       pango_dict_->set (key, val);
       pf->unprotect ();
@@ -105,10 +107,17 @@ kpathsea_find_file (String name, String ext)
   if (path.length () > 0)
     return path;
 
-  SCM kpath = ly_lily_module_constant ("ly:kpathsea-find-file");
-  if (ly_is_procedure (kpath))
+  static SCM proc;
+  if (!proc)
+    {
+      SCM module = scm_c_resolve_module ("scm kpathsea");
+      proc = scm_c_module_lookup (module, "ly:kpathsea-find-file");
+      proc = scm_variable_ref (proc);
+    }
+
+  if (ly_is_procedure (proc))
     {
-      SCM kp_result = scm_call_1 (kpath, scm_makfrom0str (name.to_str0 ()));
+      SCM kp_result = scm_call_1 (proc, scm_makfrom0str (name.to_str0 ()));
       if (scm_is_string (kp_result))
        return ly_scm2string (kp_result);
     }