]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/afm.cc
release: 1.5.29
[lilypond.git] / lily / afm.cc
index 6786afd72592ff34ac67c8070e9fce44040822a7..4485349e2995309477f966502986323d55526814 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the Flower Library
   
-  (c) 2000--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2000--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 #include "afm.hh"
@@ -22,7 +22,13 @@ Adobe_font_metric::Adobe_font_metric (AFM_Font_info * fi)
     {
       AFM_CharMetricInfo * c = fi->cmi + i;
 
-      ascii_to_metric_idx_[c->code] = i;
+      /*
+       Some TeX afm files contain code = -1. We don't know why, let's
+       ignore it.
+       
+       */
+      if (c->code >= 0)
+       ascii_to_metric_idx_[c->code] = i;
       name_to_metric_dict_[c->name] = i;
     }
 }
@@ -153,7 +159,7 @@ Adobe_font_metric::find_by_name (String s) const
       return m;
     }
   
-  SCM at = (gh_list (ly_symbol2scm ("char"),
+  SCM at = (scm_list_n (ly_symbol2scm ("char"),
                      gh_int2scm (cm->code),
                      SCM_UNDEFINED));