]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tfm.cc
* lily/lookup.cc (triangle): rewrite, obviating symmetric_x_triangle().
[lilypond.git] / lily / tfm.cc
index 2e0bf25167beca30e08c7dd8822b6c5993c5648e..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,18 +119,24 @@ 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
 Tex_font_metric::name_to_index (String s) const
 {
-  SCM sym = scm_makfrom0str (s.to_str0 ());
+  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;