X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ftfm.cc;h=942cffb3afe8fe99394177d407adeb3a8964c955;hb=48eb640005f5abb84b3d6f8db2e1704d4bff7645;hp=2e0bf25167beca30e08c7dd8822b6c5993c5648e;hpb=22ec58a860e744f90ab8900ab00576e5d1a78d16;p=lilypond.git diff --git a/lily/tfm.cc b/lily/tfm.cc index 2e0bf25167..942cffb3af 100644 --- a/lily/tfm.cc +++ b/lily/tfm.cc @@ -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;