2 font-size-engraver.cc -- implement Font_size_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 2001--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "engraver.hh"
12 class Font_size_engraver : public Engraver
15 TRANSLATOR_DECLARATIONS (Font_size_engraver);
17 DECLARE_ACKNOWLEDGER(font);
18 virtual void process_music ();
23 Font_size_engraver::Font_size_engraver ()
30 Font_size_engraver::process_music ()
32 size = robust_scm2double (get_property ("fontSize"), 0.0);
36 Font_size_engraver::acknowledge_font (Grob_info gi)
39 We only want to process a grob once.
44 if (gi.context () != context ())
48 + robust_scm2double (gi.grob ()->get_property ("font-size"), 0);
49 gi.grob ()->set_property ("font-size", scm_make_real (font_size));
52 #include "translator.icc"
54 ADD_ACKNOWLEDGER(Font_size_engraver,font);
55 ADD_TRANSLATOR (Font_size_engraver,
56 /* descr */ "Puts fontSize into font-relative-size grob property.",
59 /* reads */ "fontSize",