"is not available, return @code{#f}.")
{
Font_metric *fm = unsmob_metrics (font);
- LY_ASSERT_FIRST_SMOB (Font_metric, font);
- LY_ASSERT_TYPE(scm_is_string, 2);
+ LY_ASSERT_SMOB (Font_metric, font, 1);
+ LY_ASSERT_TYPE (scm_is_string, name, 2);
Stencil m = fm->find_by_name (ly_scm2string (name));
"in @var{font}.")
{
Font_metric *fm = unsmob_metrics (font);
- LY_ASSERT_FIRST_SMOB (Font_metric, font);
- LY_ASSERT_TYPE(scm_is_number, 2);
+ LY_ASSERT_SMOB (Font_metric, font, 1);
+ LY_ASSERT_TYPE (scm_is_number, index,2);
return fm->get_ascii_char_stencil (scm_to_int (index)).smobbed_copy ();
}
"Return the index for @var{name} in @var{font}.")
{
Font_metric *fm = unsmob_metrics (font);
- LY_ASSERT_FIRST_SMOB (Font_metric, font);
- LY_ASSERT_TYPE(scm_is_string, 2);
+ LY_ASSERT_SMOB (Font_metric, font, 1);
+ LY_ASSERT_TYPE (scm_is_string, name, 2);
return scm_from_int (fm->name_to_index (ly_scm2string (name)));
}
"Return the character code for @var{index} @var{font}.")
{
Font_metric *fm = unsmob_metrics (font);
- LY_ASSERT_FIRST_SMOB (Font_metric, font);
- LY_ASSERT_TYPE(scm_is_integer, 2);
+ LY_ASSERT_SMOB (Font_metric, font, 1);
+ LY_ASSERT_TYPE (scm_is_integer, index, 2);
return scm_from_unsigned_integer (fm->index_to_charcode (scm_to_int (index)));
}
"Return the character code for glyph @var{name} in @var{font}.")
{
Font_metric *fm = unsmob_metrics (font);
- LY_ASSERT_FIRST_SMOB (Font_metric, font);
- LY_ASSERT_TYPE(scm_is_string, 2);
+ LY_ASSERT_SMOB (Font_metric, font, 1);
+ LY_ASSERT_TYPE (scm_is_string, name, 2);
return scm_from_unsigned_integer (fm->index_to_charcode (fm->name_to_index (ly_scm2string (name))));
}
Modified_font_metric *fm = dynamic_cast<Modified_font_metric *>
(unsmob_metrics (font));
- LY_ASSERT_FIRST_SMOB (Font_metric, font);
- LY_ASSERT_TYPE(scm_is_string, 2);
+ LY_ASSERT_SMOB (Font_metric, font, 1);
+ LY_ASSERT_TYPE (scm_is_string, text, 2);
Stencil stc (fm->text_stencil (ly_scm2string (text)));
return scm_cons (ly_interval2scm (stc.extent (X_AXIS)),
ly_interval2scm (stc.extent (Y_AXIS)));
"Given the font metric @var{font}, "
"return the corresponding file name.")
{
- LY_ASSERT_FIRST_SMOB (Font_metric, font);
+ LY_ASSERT_SMOB (Font_metric, font, 1);
Font_metric *fm = unsmob_metrics (font);
SCM name = fm->font_file_name ();
"Given the font metric @var{font}, "
"return the corresponding name.")
{
- LY_ASSERT_FIRST_SMOB (Font_metric, font);
+ LY_ASSERT_SMOB (Font_metric, font, 1);
Font_metric *fm = unsmob_metrics (font);
return ly_string2scm (fm->font_name ());
"Given the font metric @var{font}, return the "
"magnification, relative to the current output-scale.")
{
- LY_ASSERT_FIRST_SMOB (Font_metric, font);
+ LY_ASSERT_SMOB (Font_metric, font, 1);
Font_metric *fm = unsmob_metrics (font);
return scm_cdr (fm->description_);
"Given the font metric @var{font}, return the "
"design size, relative to the current output-scale.")
{
- LY_ASSERT_FIRST_SMOB (Font_metric, font);
+ LY_ASSERT_SMOB (Font_metric, font, 1);
Font_metric *fm = unsmob_metrics (font);
return scm_from_double (fm->design_size ());