-LY_DEFINE (ly_font_name,"ly:font-name",
- 1, 0, 0,
- (SCM font),
- "Given the font metric @var{font}, "
- "return the corresponding file name.")
-{
- Font_metric *fm = unsmob_metrics (font);
-
- SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-
-
- if (Modified_font_metric* mfm = dynamic_cast<Modified_font_metric*> (fm))
- return ly_font_name (mfm->original_font ()->self_scm ());
- else if (Adobe_font_metric* afm = dynamic_cast<Adobe_font_metric*> (fm))
- {
- return scm_makfrom0str (afm->font_info_->gfi->fontName);
- }
- else
- return SCM_BOOL_F;
-}
-
-
-
-LY_DEFINE (ly_font_magnification,"ly:font-magnification", 1 , 0, 0,
- (SCM font),
- "Given the font metric @var{font}, return the "
- "magnification, relative to the current outputscale.")
-{
- Font_metric *fm = unsmob_metrics (font);
- SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
- return ly_cdr (fm->description_);
-}
-
-LY_DEFINE (ly_font_design_size,"ly:font-design-size", 1 , 0, 0,
- (SCM font),
- "Given the font metric @var{font}, return the "
- "design size, relative to the current outputscale.")
-{
- Font_metric *fm = unsmob_metrics (font);
- SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
- return scm_make_real (fm->design_size ());
-}
-
-