-SCM
-Font_interface::font_alist_chain (Grob *me)
-{
- /*
- Ugh: why the defaults?
- */
- SCM defaults = me->get_paper ()->lookup_variable (ly_symbol2scm ("font-defaults"));
-
- SCM ch = me->get_property_alist_chain (defaults);
- return ch;
-}
-
-/*
- todo: split up this func, reuse in text_item?
- */
-Font_metric *
-Font_interface::get_default_font (Grob*me)
-{
- Font_metric * fm = unsmob_metrics (me->get_grob_property ("font"));
- if (fm)
- return fm;
-
- fm = get_font (me, font_alist_chain (me));
- me->set_grob_property ("font", fm->self_scm ());
- return fm;
-}
-
-
-LY_DEFINE(ly_font_interface_get_default_font,
- "ly:get-default-font", 1 , 0, 0,
- (SCM grob), "Return the default font for grob @var{gr}.")
-{
- Grob * gr = unsmob_grob (grob);
- SCM_ASSERT_TYPE(gr, grob, SCM_ARG1, __FUNCTION__, "grob");
-
- return Font_interface::get_default_font (gr)->self_scm ();
-}
-
-LY_DEFINE(ly_font_interface_get_font,"ly:get-font", 2, 0, 0,
- (SCM grob, SCM alist),
- "Return a font metric satisfying the font-qualifiers in @var{alist}.
-
-
-The font object represents the metric information of a font. Every font
-that is loaded into LilyPond can be accessed via Scheme.
-
-LilyPond only needs to know the dimension of glyph to be able to process
-them. This information is stored in font metric files. LilyPond can read
-two types of font-metrics: @TeX{} Font Metric files (TFM files) and
-Adobe Font Metric files (AFM files). LilyPond will always try to load
-AFM files first since they are more versatile.
-
-")
-{
- Grob * gr = unsmob_grob (grob);
- SCM_ASSERT_TYPE(gr, grob, SCM_ARG1, __FUNCTION__, "grob");
-
- Font_metric*fm=
- Font_interface::get_font (gr, gh_cons (alist,
- Font_interface::font_alist_chain (gr)));
-
- return fm->self_scm();
-}