(c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
Mats Bengtsson <matsb@s3.kth.se> (the ugly TeX parsing in text_dimension)
- */
+*/
#include <math.h>
#include <ctype.h>
-#include "scaled-font-metric.hh"
+#include "modified-font-metric.hh"
#include "virtual-methods.hh"
#include "warn.hh"
#include "stencil.hh"
}
Offset
-Font_metric::get_indexed_wxwy (int )const
+Font_metric::get_indexed_wxwy (int) const
{
return Offset (0, 0);
}
{
Font_metric *fm = unsmob_metrics (font);
SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
- SCM_ASSERT_TYPE (ly_c_string_p (name), name, SCM_ARG2, __FUNCTION__, "string");
+ SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG2, __FUNCTION__, "string");
Stencil m = fm->find_by_name (ly_scm2string (name));
{
Font_metric *fm = unsmob_metrics (font);
SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
- SCM_ASSERT_TYPE (is_number (index), index, SCM_ARG2, __FUNCTION__, "number");
+ SCM_ASSERT_TYPE (scm_is_number (index), index, SCM_ARG2, __FUNCTION__, "number");
- return fm->get_ascii_char_stencil (ly_scm2int (index)).smobbed_copy ();
+ return fm->get_ascii_char_stencil (scm_to_int (index)).smobbed_copy ();
}
LY_DEFINE (ly_text_dimension,"ly:text-dimension",
Modified_font_metric*fm = dynamic_cast<Modified_font_metric*>
(unsmob_metrics (font));
SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "modified font metric");
- SCM_ASSERT_TYPE (ly_c_string_p (text), text, SCM_ARG2, __FUNCTION__, "string");
+ SCM_ASSERT_TYPE (scm_is_string (text), text, SCM_ARG2, __FUNCTION__, "string");
b = fm->text_dimension (ly_scm2string (text));
{
Font_metric *fm = unsmob_metrics (font);
SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
- return ly_car (fm->description_);
+ return scm_car (fm->description_);
}
1, 0, 0,
(SCM font),
"Given the font metric @var{font}, "
- "return the corresponding file name.")
+ "return the corresponding name.")
{
Font_metric *fm = unsmob_metrics (font);
{
Font_metric *fm = unsmob_metrics (font);
SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
- return ly_cdr (fm->description_);
+ return scm_cdr (fm->description_);
}
LY_DEFINE (ly_font_design_size,"ly:font-design-size", 1 , 0, 0,
scm_makfrom0str (input_coding.to_str0 ()),
scm_makfrom0str (font_coding.to_str0 ()),
scm_int2num (code));
- return ly_scm2int (s);
+ return scm_to_int (s);
}