Re: [patch] X-aligned instrument names
Le 11 févr. 08 à 02:41, Han-Wen Nienhuys a écrit : Sounds like a good idea. You could do the same with the other lines, if you would assume that there was a 'virtual' indent (don't change the line dimensions, but assume there is a global given space to align names with) Ok. Should I define a new layout property for that? Maybe the best would be to have it computed: for the other lines, the virtual indent is the length of the larger short instrument name. (But then I have no idea how that could be done). + Real right_padding = padding * (1.0 - ((align_x + 1.0) / 2.0)); this looks as if you're looking for the linear_combination function ok. + Stencil right_stencil (right_box, ly_string2scm ()); + right_stencil.translate_axis (p_extent[RIGHT], X_AXIS); why don't you create a stencil with a modified dimesions and the same expression? Adding a bogus () seems unnecessary. I thought about that this morning while driving to work. nicolas ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [patch] X-aligned instrument names
Le 10 févr. 08 à 16:35, Nicolas Sceaux a écrit : The following patch add x-alignment support for instrument names: being given the amount of indentation, and the value of the self-alignment-X grob property, some padding is added to the right of the instrument name. [...] I had a few thoughts concerning instrument names. 1) Shouldn't there be a smaller indent reserved for lines but the first one, to write the short instrument name? It could default to 0. Then the X-alignment hack could be generalized to all instrument names, long or short. 2) It would be nice also to have an extendable indent for the first system, when some instrument names are longer than the defined indent. If the Instrument_name_engraver can increase the indent layout property then it should be quite simple to implement. If this seems reasonable I can work on patches. nicolas ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [patch] X-aligned instrument names
Sounds like a good idea. You could do the same with the other lines, if you would assume that there was a 'virtual' indent (don't change the line dimensions, but assume there is a global given space to align names with) 2008/2/10, Nicolas Sceaux [EMAIL PROTECTED]: The following patch add x-alignment support for instrument names: being given the amount of indentation, and the value of the self-alignment-X grob property, some padding is added to the right of the instrument name. \override Staff.InstrumentName #'self-alignment-X = #LEFT == instrument name aligned on the left margin \override Staff.InstrumentName #'self-alignment-X = #CENTER == instrument name centered in the indentation \override Staff.InstrumentName #'self-alignment-X = #RIGHT == instrument name right-aligned, on the system start. If the instrument name is bigger than the indentation, it will be placed as if right aligned. May I apply? + Real right_padding = padding * (1.0 - ((align_x + 1.0) / 2.0)); this looks as if you're looking for the linear_combination function + Stencil right_stencil (right_box, ly_string2scm ()); + right_stencil.translate_axis (p_extent[RIGHT], X_AXIS); why don't you create a stencil with a modified dimesions and the same expression? Adding a bogus () seems unnecessary. -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel