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 ();
}
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;