lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a proper whiteout function


From: Alexander Kobel
Subject: Re: a proper whiteout function
Date: Wed, 29 Apr 2015 15:17:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 04/29/2015 03:03 PM, Kieren MacMillan wrote:
Hi Francisco,

To achieve a whiteout that is useful for music, I think a thick
default 'middle' stroke in white on a lower layer would work.
See example.

YES! This is exactly the kind of thing I’m hoping for.

+1.

Do you think this “function” (bad choice of words here, I know) could be made 
to handle arbitrary [music] grobs, or would one always have to manually work 
through all 4 (?) steps of the process for each grob?

I guess Francisco's example was handmade in Inkscape or similar software, but it should be possible to automize it. AFAIK, all output from Lilypond is laid out in Postscript first, which offers support for these operations (at least for text) - see the attached example and, e.g., the following page.
  http://paulbourke.net/dataformats/postscript/
The Postscript code for this is as follows:

%!PS-Adobe-3.0
/Times-Bold findfont 30 scalefont setfont

100 400 moveto
(Hello World!)
true charpath
5 setlinewidth
0.5 setgray
stroke

100 400 moveto
(Hello World!)
0 setgray
show

showpage

The main idea is to typeset the object/path/glyph/grob, you name it, twice: once in white, non-filled, with thick stroke, and once in the actual color. IIUC, this could be achieved by some stencil which is on top of the PS-output-stencil. Unfortunately, I could not make it work with glyphshow, which is what is used for the embedded fonts (at least by Lilypond)...


Best,
Alexander

Attachment: hello.ps
Description: PostScript document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]