2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2001--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
21 #include "engraver.hh"
23 class Font_size_engraver
: public Engraver
26 TRANSLATOR_DECLARATIONS (Font_size_engraver
);
28 DECLARE_ACKNOWLEDGER (font
);
29 void process_music ();
34 Font_size_engraver::Font_size_engraver ()
40 Font_size_engraver::process_music ()
42 size
= robust_scm2double (get_property ("fontSize"), 0.0);
46 Font_size_engraver::acknowledge_font (Grob_info gi
)
49 We only want to process a grob once.
54 if (gi
.context () != context ())
58 + robust_scm2double (gi
.grob ()->get_property ("font-size"), 0);
59 gi
.grob ()->set_property ("font-size", scm_from_double (font_size
));
62 #include "translator.icc"
64 ADD_ACKNOWLEDGER (Font_size_engraver
, font
);
65 ADD_TRANSLATOR (Font_size_engraver
,
67 "Put @code{fontSize} into @code{font-size} grob property.",