LEFT | RIGHT |
1 /* | 1 /* |
2 hyphen-engraver.cc -- implement Hyphen_engraver | 2 hyphen-engraver.cc -- implement Hyphen_engraver |
3 | 3 |
4 source file of the GNU LilyPond music typesetter | 4 source file of the GNU LilyPond music typesetter |
5 | 5 |
6 (c) 1999--2009 Glen Prideaux <glenprideaux@iname.com>, | 6 (c) 1999--2009 Glen Prideaux <glenprideaux@iname.com>, |
7 Han-Wen Nienhuys <hanwen@xs4all.nl>, | 7 Han-Wen Nienhuys <hanwen@xs4all.nl>, |
8 Jan Nieuwenhuizen <janneke@gnu.org> | 8 Jan Nieuwenhuizen <janneke@gnu.org> |
9 */ | 9 */ |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 finished_hyphen_ = 0; | 48 finished_hyphen_ = 0; |
49 finished_ev_ = 0; | 49 finished_ev_ = 0; |
50 ev_ = 0; | 50 ev_ = 0; |
51 } | 51 } |
52 | 52 |
53 void | 53 void |
54 Hyphen_engraver::acknowledge_lyric_syllable (Grob_info i) | 54 Hyphen_engraver::acknowledge_lyric_syllable (Grob_info i) |
55 { | 55 { |
56 Item *item = i.item (); | 56 Item *item = i.item (); |
57 SCM text = item->get_property ("text"); | 57 SCM text = item->get_property ("text"); |
58 if (ly_is_equal (text, scm_from_locale_string (" "))) { | 58 current_lyric_is_skip_ = ly_is_equal (text, scm_from_locale_string (" ")); |
59 current_lyric_is_skip_ = true; | |
60 } else { | |
61 current_lyric_is_skip_ = false; | |
62 } | |
63 ·· | 59 ·· |
64 if (!hyphen_ && !current_lyric_is_skip_) | 60 if (!hyphen_ && !current_lyric_is_skip_) |
65 hyphen_ = make_spanner ("LyricSpace", item->self_scm ()); | 61 hyphen_ = make_spanner ("LyricSpace", item->self_scm ()); |
66 | 62 |
67 if (hyphen_) | 63 if (hyphen_) |
68 hyphen_->set_bound (LEFT, item); | 64 hyphen_->set_bound (LEFT, item); |
69 ······ | 65 ······ |
70 if (finished_hyphen_ && !current_lyric_is_skip_) | 66 if (finished_hyphen_ && !current_lyric_is_skip_) |
71 finished_hyphen_->set_bound (RIGHT, item); | 67 finished_hyphen_->set_bound (RIGHT, item); |
72 } | 68 } |
73 | 69 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 /* create */ | 157 /* create */ |
162 "LyricHyphen " | 158 "LyricHyphen " |
163 "LyricSpace ", | 159 "LyricSpace ", |
164 | 160 |
165 /* read */ | 161 /* read */ |
166 "", | 162 "", |
167 | 163 |
168 /* write */ | 164 /* write */ |
169 "" | 165 "" |
170 ); | 166 ); |
LEFT | RIGHT |