Am Mi., 1. Sept. 2021 um 16:25 Uhr schrieb Jean Abou Samra <j...@abou-samra.fr>: > > Le 01/09/2021 à 15:11, Rene Brandenburger a écrit : > > I use the \postscript a lot when typesetting contemporary music e.g. > > like this: > > > > \version "2.20.0" > > > > > > wave_line = \markup { > > \with-dimensions #'(0 . 0) #'(0 . 0) > > \postscript #"0.3 setlinewidth 1 setlinecap [0 1] > > 0 0 0 setrgbcolor 0.00 -3.50 moveto > > 0.23 -3.71 0.47 -3.93 1.00 -4.00 curveto > > 1.53 -4.07 2.36 -4.00 3.00 -3.50 curveto > > 3.64 -3.00 4.11 -2.07 4.50 -1.46 curveto > > 4.89 -0.84 5.22 -0.55 6.00 -0.80 curveto > > 6.78 -1.05 8.03 -1.83 9.00 -1.53 curveto > > 9.97 -1.23 10.66 0.15 11.50 0.50 curveto > > 12.34 0.85 13.32 0.17 14.00 -0.50 curveto > > 14.68 -1.17 15.05 -1.84 16.00 -2.50 curveto > > 16.95 -3.16 18.47 -3.82 20.00 -4.49 curveto > > stroke " > > } > > > > \relative c''{ > > s1*5^\wave_line > > } > > > This use case continues to be supported with > Cairo. Just convert \postscript to \path, wich > works both in the current PS backend and with Cairo. > > \version "2.22.1" > > wave_line = \markup { > \with-dimensions #'(0 . 0) #'(0 . 0) > \path #0.5 > #'((moveto 0.00 -3.50) > (curveto 0.23 -3.71 0.47 -3.93 1.00 -4.00) > (curveto 1.53 -4.07 2.36 -4.00 3.00 -3.50) > (curveto 3.64 -3.00 4.11 -2.07 4.50 -1.46) > (curveto 4.89 -0.84 5.22 -0.55 6.00 -0.80) > (curveto 6.78 -1.05 8.03 -1.83 9.00 -1.53) > (curveto 9.97 -1.23 10.66 0.15 11.50 0.50) > (curveto 12.34 0.85 13.32 0.17 14.00 -0.50) > (curveto 14.68 -1.17 15.05 -1.84 16.00 -2.50) > (curveto 16.95 -3.16 18.47 -3.82 20.00 -4.49)) > } > > { s1*5^\wave_line } > > Actually, this is better in any case, because from > \path LilyPond is able to get extents and "skylines" > (outlines). Try: > > \version "2.22.1" > > #(ly:set-option 'debug-skylines) > > wave_line = \markup > \path #0.5 > #'((moveto 0.00 -3.50) > (curveto 0.23 -3.71 0.47 -3.93 1.00 -4.00) > (curveto 1.53 -4.07 2.36 -4.00 3.00 -3.50) > (curveto 3.64 -3.00 4.11 -2.07 4.50 -1.46) > (curveto 4.89 -0.84 5.22 -0.55 6.00 -0.80) > (curveto 6.78 -1.05 8.03 -1.83 9.00 -1.53) > (curveto 9.97 -1.23 10.66 0.15 11.50 0.50) > (curveto 12.34 0.85 13.32 0.17 14.00 -0.50) > (curveto 14.68 -1.17 15.05 -1.84 16.00 -2.50) > (curveto 16.95 -3.16 18.47 -3.82 20.00 -4.49)) > > { s1*5^\wave_line } > > versus > > \version "2.22.1" > > #(ly:set-option 'debug-skylines) > > wave_line = \markup > \postscript #"0.3 setlinewidth 1 setlinecap [0 1] > 0 0 0 setrgbcolor 0.00 -3.50 moveto > 0.23 -3.71 0.47 -3.93 1.00 -4.00 curveto > 1.53 -4.07 2.36 -4.00 3.00 -3.50 curveto > 3.64 -3.00 4.11 -2.07 4.50 -1.46 curveto > 4.89 -0.84 5.22 -0.55 6.00 -0.80 curveto > 6.78 -1.05 8.03 -1.83 9.00 -1.53 curveto > 9.97 -1.23 10.66 0.15 11.50 0.50 curveto > 12.34 0.85 13.32 0.17 14.00 -0.50 curveto > 14.68 -1.17 15.05 -1.84 16.00 -2.50 curveto > 16.95 -3.16 18.47 -3.82 20.00 -4.49 curveto > stroke " > > { s1*5^\wave_line } > > > > Denemo uses postscript to generate a title page with a border. > > From a glance at the output of > > git grep "\\\\postscript" > > in the Denemo repository, that should be easy to convert > to \path as above. > > Best regards, > Jean > >
Hi, some thoughts: A file like the attachment to http://lists.gnu.org/archive/html/lilypond-user/2013-11/msg00757.html would be a bit more work to convert, I suppose, although I didn't try ... ps-code not causing skylines, etc may be a feature in some cases and not a problem, imho. Regarding LSR, there are 20 snippets related to postscript. Thus we can expect \postscript is widely used out there. Thus, I'd not drop \postscript and friends without a ready-to-use and user-friendly replacement. This does not mean I'd object to cairo, my own experiments with the cairo-backend were all very nice! Cheers, Harm