]> git.donarmstrong.com Git - lilypond.git/blob - lily/atom.cc
patch::: 1.3.17.jcn2
[lilypond.git] / lily / atom.cc
1 /*
2   atom.cc -- implement Atom
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #include "atom.hh"
10 #include "interval.hh"
11 #include "string.hh"
12 #include "array.hh"
13 #include "debug.hh"
14 #include "dimensions.hh"
15 #include "lookup.hh"
16 #include "main.hh"
17 #include "global-ctor.hh"
18 #include "font-metric.hh"
19
20 Atom::Atom(SCM s)
21 {
22   func_ = s;
23 }
24
25 void
26 Atom::fontify (Font_metric * met)
27 {
28
29   SCM desc = ly_quote_scm (met->description ());
30   SCM font_switch = gh_list (ly_symbol2scm ("select-font"),
31                              desc,
32                              SCM_UNDEFINED);
33
34   SCM f =func_;
35   func_ = gh_list (ly_symbol2scm ("string-append"),
36                    font_switch , f,
37                    SCM_UNDEFINED);
38
39 }