2 font-size-engraver.cc -- implement Font_size_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 2001--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
10 #include "engraver.hh"
12 class Font_size_engraver
: public Engraver
15 TRANSLATOR_DECLARATIONS (Font_size_engraver
);
17 DECLARE_ACKNOWLEDGER (font
);
18 void process_music ();
23 Font_size_engraver::Font_size_engraver ()
29 Font_size_engraver::process_music ()
31 size
= robust_scm2double (get_property ("fontSize"), 0.0);
35 Font_size_engraver::acknowledge_font (Grob_info gi
)
38 We only want to process a grob once.
43 if (gi
.context () != context ())
47 + robust_scm2double (gi
.grob ()->get_property ("font-size"), 0);
48 gi
.grob ()->set_property ("font-size", scm_from_double (font_size
));
51 #include "translator.icc"
53 ADD_ACKNOWLEDGER (Font_size_engraver
, font
);
54 ADD_TRANSLATOR (Font_size_engraver
,
56 "Put @code{fontSize} into @code{font-size} grob property.",