]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tfm.cc
Configure only pristine build tree or on user
[lilypond.git] / lily / tfm.cc
index f5cb273494ebd6e9a4bdaa3258417c0bb5213ac2..942cffb3afe8fe99394177d407adeb3a8964c955 100644 (file)
@@ -105,7 +105,7 @@ Tex_font_metric::make_tfm (String filename)
   
   tfm->encoding_table_ =
     scm_call_1 (ly_scheme_function ("get-coding-table"),
-               scm_makfrom0str (tfm->info_.coding_scheme.to_str0 ()));
+               scm_makfrom0str (tfm->coding_scheme ().to_str0 ()));
 
   return tfm->self_scm ();
 }
@@ -119,7 +119,13 @@ Tex_font_metric::design_size () const
 String
 Tex_font_metric::coding_scheme () const
 {
-  return info_.coding_scheme;
+  String scm = info_.coding_scheme;
+
+  for(int i = 0; i < scm.length (); i++)
+    if (scm[i] == ' ')
+      scm[i] = '-';
+
+  return scm;
 }
 
 int
@@ -128,9 +134,9 @@ Tex_font_metric::name_to_index (String s) const
   SCM sym = ly_symbol2scm (s.to_str0 ());
 
   SCM idx = scm_hash_ref (encoding_table_, sym, SCM_BOOL_F);
-  if (gh_char_p (idx))
+  if (ly_c_char_p (idx))
     {
-      return (unsigned char) gh_scm2char (idx);
+      return (unsigned char) ly_scm2char (idx);
     }
   else
     return -1;