Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(481)

Issue 105410046: cleanup alignments of various grobs (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 10 months ago by janek
Modified:
9 years, 9 months ago
Reviewers:
lemzwerg
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

SUMMARY: DynamicTexts, TextScripts and many other grobs use aligned_on_parent, which makes their behaviour consitent, predictable and thus more user-friendly. Consists of 3 commits: Clean up DynamicText horizontal alignment. Until now, DynamicText alignment was messy, as there were 3 different callbacks involved - some of them interacting in a confusing way: - in define-grobs.scm, X-offset property was initialized to ly:self-alignment-interface::x-aligned-on-self, - Dynamic_engraver called set_center_parent on every DynamicText attached to a note, so that half a NoteHead width was always added to its X-offset (producing confusing results for example when user requested dynamics to be left-aligned), - DynamicTexts living in a Dynamics context used a completely different offset callback, which aligned them on NoteColumns. Since aligned_on_parent is now able to correctly align grobs with PaperColumn parents (issue 3254), we can use it for all DynamicTexts and have a single interface for the job. Expected changes in output: DynamicTexts in Dynamics context aligned to suspended noteheads may be placed up to 1/4 NoteHead width further to the right. This shouldn't be a problem. Replace XY-offset closures with aligned_on_parent where possible It doesn't make sense to specify placement using multiple added callbacks or closures when we can use aligned_on_parent. What's more, aligned_on_parent should expose more consistent interface for the users - affected grobs should now behave similarly to LyricTexts and DynamicTexts. For example, this \relative c'' \context Voice { \compressFullBarRests \override MultiMeasureRestNumber.self-alignment-X = #RIGHT R1*100 } will result in right edge of the MultiMeasureRestNumber being aligned on the right edge of the MultiMeasureRest. Affected grobs: - Fingering - AccidentalSuggestion - ClefModifier - DoublePercentRepeatCounter - GridLine - MultiMeasureRestNumber - MultiMeasureRestText - PercentRepeatCounter - StemTremolo Expected changes in output: none. TextScript, CombineTextScript: use aligned_on_parent I think this makes more sense than just using "self-alignment". It makes these grobs consistent with Lyrics and Dynamics, and allows users to override their alignment more predictably. Expected changes in output: TextScripts and CombineTextScripts will be aligned slightly different when the user sets self-alignment-X explicitly (parent notehead will be included in alignment, as in Lyrics). Default placement should remain the same. I'm also changing one regtest, just to make sure that despite slightly changed alignment the markups will stick out far enough to the left.

Patch Set 1 #

Patch Set 2 : rebase on master, don't include aligned_on_parent refactoring #

Patch Set 3 : keep old value for TextScript alignment (fix fingering diagrams) #

Patch Set 4 : rebase on master, slightly adjust one regtest #

Patch Set 5 : whitespace fixes and property reordering (shouldn't affect countdown) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -126 lines) Patch
M input/regression/text-spanner-attachment-alignment.ly View 1 2 3 4 1 chunk +10 lines, -12 lines 0 comments Download
M lily/dynamic-engraver.cc View 1 chunk +1 line, -4 lines 0 comments Download
M lily/fingering-engraver.cc View 1 chunk +1 line, -2 lines 0 comments Download
M lily/include/self-alignment-interface.hh View 2 3 1 chunk +1 line, -3 lines 0 comments Download
M lily/new-fingering-engraver.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M lily/self-alignment-interface.cc View 1 2 3 2 chunks +2 lines, -31 lines 0 comments Download
M ly/engraver-init.ly View 1 chunk +0 lines, -7 lines 0 comments Download
M scm/define-grobs.scm View 1 2 3 4 10 chunks +25 lines, -63 lines 0 comments Download

Messages

Total messages: 8
janek
Hello, this is a follow-up to issues 3254 (https://code.google.com/p/lilypond/issues/detail?id=3254) and 3962 (https://code.google.com/p/lilypond/issues/detail?id=3962). It's not finished ...
9 years, 10 months ago (2014-06-26 18:37:12 UTC) #1
lemzwerg
LGTM (without any testing).
9 years, 10 months ago (2014-06-27 04:34:36 UTC) #2
janek
rebase on master, don't include aligned_on_parent refactoring
9 years, 10 months ago (2014-06-28 12:36:45 UTC) #3
janek
keep old value for TextScript alignment (fix fingering diagrams)
9 years, 10 months ago (2014-06-28 21:57:53 UTC) #4
janek
On 2014/06/27 04:34:36, lemzwerg wrote: > LGTM (without any testing). Thanks, Werner! I decided to ...
9 years, 10 months ago (2014-06-28 22:37:05 UTC) #5
janek
rebase on master, slightly adjust one regtest
9 years, 10 months ago (2014-06-29 23:07:54 UTC) #6
janek
whitespace fixes and property reordering (shouldn't affect countdown)
9 years, 9 months ago (2014-07-04 20:48:04 UTC) #7
janek
9 years, 9 months ago (2014-07-05 21:16:17 UTC) #8
Pushed as merge commit:

*   0bc7f77 Issue 3978: Merge alignment cleanup
|\  
| * d6604b0 define-grobs.scm: reorder properties
| * 6f3f8f0 TextScript: use aligned_on_parent
| * 1d76502 Replace offset closures with aligned_on_parent
| * 09412c2 Clean up DynamicText horizontal alignment.
|/
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b