Skip to content
Snippets Groups Projects

Match X extent of Dots to real extent

Merged Jean Abou Samra requested to merge jeanas/lilypond:dots into master

Before, the Dots stencil had an extra X extent at the left to pad the dots from the note heads. There are several problems with this. One is that it's surprising, since X-extent normally represents the width of the object itself. A more immediate problem is that slurs were being pushed away further than necessary when starting or ending on dotted notes, because Slur_configuration::score_extra_encompass in slur-configuration.cc has a special path for grobs that overlap with the note heads, and this path was being triggered for dots, while they are in fact not overlapping horizontally with the heads. This code path would cause the slur to push itself away enough to start/end at a higher point than the top of the dot.

This fixes these by moving the padding from Dots to DotColumn. The new property DotColumn.padding determines how much the DotColumn moves away from the note heads.

This also has the nice consequence of making DotColumn.padding configurable; before, there was no simple way to configure the distance from heads to dots.

Fixes #3863 (closed)


This also obviates !1622 (closed), and fixes cases that !1622 (closed) does not fix, basically those where the problem lies (in part) in a dot on the first note rather than the last, like

{ a''4.( a'') }
Edited by Jean Abou Samra

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Dan Eble
  • Colin Campbell mentioned in merge request !1622 (closed)

    mentioned in merge request !1622 (closed)

  • For the record, the present test results: image

    image

  • Colin Campbell added Patchreview label and removed Patchnew label

    added Patchreview label and removed Patchnew label

  • Jean Abou Samra added 2 commits

    added 2 commits

    • 6ee8dda0 - Test dots and ligatures in KievanStaff
    • 5d4c19fc - Match X extent of Dots to real extent

    Compare with previous version

  • LilyPond Bot added Patchnew label and removed Patchreview label

    added Patchnew label and removed Patchreview label

  • Jean Abou Samra marked this merge request as ready

    marked this merge request as ready

  • Jean Abou Samra changed the description

    changed the description

  • Jean Abou Samra resolved all threads

    resolved all threads

  • added 1 commit

    • de0d8e5b - Match X extent of Dots to real extent

    Compare with previous version

  • Jean Abou Samra added 4 commits

    added 4 commits

    Compare with previous version

  • Author Developer

    Test results can be found at https://lilypond.gitlab.io/-/lilypond/-/jobs/3080769843/artifacts/test-results/index.html.

    This is the new test slur-dot-distance.ly:

    image

    For comparison, here's the 2.23.13 output for this test:

    image

    The slur is now closer to the heads in slur-dot-collision.ly:

    image

    kievan-notation.ly has added music that tests the handling of dots. The output of this new version of the test does not change with this MR.

    image

    morgenlied.ly has slurs closer to heads, this is before:

    image

    and after:

    image

    cross-staff-stems.ly changes slightly.

    image

    The reason for this difference is that the lower skyline now looks like this:

    image

    instead of this:

    image

  • Jean Abou Samra added Patchreview label and removed Patchnew label

    added Patchreview label and removed Patchnew label

    • Developer
      Resolved by Dan Eble

      image

      This change makes the test less realistic because the note for that final syllable is a special form that is used at the end of the piece. It would be better to add dots to earlier notes (or in a separate staff or test).

  • Jean Abou Samra added 2 commits

    added 2 commits

    • 34de6c63 - Test dots with ligatures in KievanStaff
    • 39de52db - Match X extent of Dots to real extent

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading