tr-igem / esmuflily

Extension for LilyPond to support SMuFL compliant fonts
http://www.ekmelic-music.org/en/extra/esmuflily.htm
MIT License
0 stars 0 forks source link

Augmentation dots placed too far to the right #7

Open dbenjaminmiller opened 2 months ago

dbenjaminmiller commented 2 months ago

Here is a comparison, showing only the difference and all features turned on ''except'' dots, using \ekmSmuflOff #'dot, and then all features turned on (including ekm augmentation dots). The dots are placed too far to the right when esmuflily is used (i.e., they are further from the notehead than they would be natively).

image image

This difference is consistent; the augmentation dots are placed further to the right when esmuflily is enabled.

dbenjaminmiller commented 2 months ago

seems that the padding matches native LP when we change the padding in ly:stencil-stack from ext to 0, as follows:

  (let ((ext (ekm-extent dot X)))
    (let cat ((c (max count 0))
              (r (if pad point-stencil empty-stencil)))
      (if (zero? c) r
        (cat (1- c) (ly:stencil-stack r X RIGHT dot 0))))))
dbenjaminmiller commented 2 months ago

OK, changing to zero does mess up double dots... so it should only be zero for the first dot.

tr-igem commented 1 month ago

The wrong placement arises from an additional leading pad with point-stencil. The pad between two or more dots has to be taken from dot extend, at least for markup commands like \ekm-note-by-number and ekm-rest-by-number. So I changed back to Dots.stencil, partly because I think that the pad should be font specific, not Lilypond specific. There is also a SMuFL issue.

dbenjaminmiller commented 1 month ago

Interesting, I will have to try out your new version. Does it still produce the same spacing as LP's by default now?

My thinking would be that, if it's possible, we should use the native LilyPond technique for placing symbols (dots or otherwise). Part of this is so the tweaks applied are as close as possible to the native ones.

I don't recall off the top of my head whether or not the dot placement is actually properly tweakable in LP without redefining Dots.stencil altogether, though.

tr-igem commented 1 month ago

The solution with Dots-stencil affects the pad between two dots, while the spacing between note head and dot is now the same as Lilypond's default.