LY_DEFINE (ly_font_glyph_name_to_index, "ly:font-glyph-name-to-index",
2, 0, 0,
(SCM font, SCM name),
- "Return the index for @{name} in @var{font}.")
+ "Return the index for @var{name} in @var{font}.")
{
Font_metric *fm = unsmob_metrics (font);
SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
SCM_ASSERT_TYPE (scm_is_integer (index), index, SCM_ARG2, __FUNCTION__, "index");
- return scm_from_unsigned_integer (fm->index_to_charcode (ly_scm2int (index)));
+ return scm_from_unsigned_integer (fm->index_to_charcode (scm_to_int (index)));
}
LY_DEFINE (ly_font_glyph_name_to_charcode, "ly:font-glyph-name-to-charcode",
2, 0, 0,
(SCM font, SCM name),
- "Return the character code for glyph @{name} in @var{font}.")
+ "Return the character code for glyph @var{name} in @var{font}.")
{
Font_metric *fm = unsmob_metrics (font);
SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
return (unsigned) index_to_ascii (i);
}
-#if 0
-unsigned
-Font_metric::glyph_name_to_charcode (String glyph_name) const
-{
- return (unsigned) index_to_ascii (name_to_index (glyph_name));
-}
-#endif
-
Stencil
Font_metric::get_ascii_char_stencil (int code) const
{
{
return Offset (0, 0);
}
+
+SCM
+Font_metric::sub_fonts () const
+{
+ return SCM_EOL;
+}