LEFT | RIGHT |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 1997--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1997--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 | 5 |
6 LilyPond is free software: you can redistribute it and/or modify | 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 | 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 | 8 the Free Software Foundation, either version 3 of the License, or |
9 (at your option) any later version. | 9 (at your option) any later version. |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 SCM glyph_scm = me->get_property ("glyph-name"); | 57 SCM glyph_scm = me->get_property ("glyph-name"); |
58 if (!scm_is_string (glyph_scm)) | 58 if (!scm_is_string (glyph_scm)) |
59 return SCM_EOL; | 59 return SCM_EOL; |
60 | 60 |
61 string glyph = string (ly_scm2string (glyph_scm)); | 61 string glyph = string (ly_scm2string (glyph_scm)); |
62 Font_metric *fm = Font_interface::get_default_font (me); | 62 Font_metric *fm = Font_interface::get_default_font (me); |
63 Stencil out = fm->find_by_name (glyph); | 63 Stencil out = fm->find_by_name (glyph); |
64 if (out.is_empty ()) | 64 if (out.is_empty ()) |
65 me->warning (_f ("clef `%s' not found", glyph.c_str ())); | 65 me->warning (_f ("clef `%s' not found", glyph.c_str ())); |
66 | 66 |
67 me->set_property ("stencil", out.smobbed_copy ()); | |
68 me->set_property ("vertical-skylines-cache-name", scm_call_1 (ly_lily_module_c
onstant ("grob::make-vertical-skylines-cache-name"), smob)); | |
69 return out.smobbed_copy (); | 67 return out.smobbed_copy (); |
70 } | 68 } |
71 | 69 |
72 ADD_INTERFACE (Clef, | 70 ADD_INTERFACE (Clef, |
73 "A clef sign.", | 71 "A clef sign.", |
74 | 72 |
75 /* properties */ | 73 /* properties */ |
76 "full-size-change " | 74 "full-size-change " |
77 "glyph " | 75 "glyph " |
78 "glyph-name " | 76 "glyph-name " |
79 "non-default " | 77 "non-default " |
80 "vertical-skylines-cache-name " | |
81 ); | 78 ); |
82 | 79 |
LEFT | RIGHT |