Merge branch 'fret-diagram-details'
[lilypond/csorensen.git] / lily / all-font-metrics-scheme.cc
bloba3b19e468d2bf4ea6ad990bab60d55fa76fde6df
1 /*
2 all-font-metrics-scheme.cc -- implement bindings for
3 All_font_metrics.
5 source file of the GNU LilyPond music typesetter
7 (c) 2007 Han-Wen Nienhuys <hanwen@lilypond.org>
9 */
11 #include "all-font-metrics.hh"
12 #include "main.hh"
14 LY_DEFINE (ly_reset_all_fonts, "ly:reset-all-fonts", 0, 0, 0,
15 (),
16 "Forget all about previously loaded fonts.")
18 delete all_fonts_global;
19 all_fonts_global = new All_font_metrics (global_path.to_string ());
21 return SCM_UNSPECIFIED;
25 LY_DEFINE (ly_font_load, "ly:font-load", 1, 0, 0,
26 (SCM name),
27 "Load the font @var{name}.")
29 LY_ASSERT_TYPE (scm_is_string, name, 1);
31 Font_metric *fm = all_fonts_global->find_font (ly_scm2string (name));
33 return fm->self_scm ();