After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 503290 - too thick barlines from GNU LilyPond PDF
too thick barlines from GNU LilyPond PDF
Status: RESOLVED NOTGNOME
Product: evince
Classification: Core
Component: printing
2.20.x
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-12-12 17:23 UTC by Francisco Vila
Modified: 2011-08-22 07:19 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
a minimal LilyPond score that shows the problem (33 bytes, text/plain)
2007-12-12 19:58 UTC, Francisco Vila
Details
sample PDF output from LilyPond (20.12 KB, application/pdf)
2007-12-12 20:06 UTC, Francisco Vila
Details
PS output from minimal sample score file (138.09 KB, application/postscript)
2007-12-12 20:21 UTC, Francisco Vila
Details

Description Francisco Vila 2007-12-12 17:23:22 UTC
When rendering a GNU LilyPond PDF score for previewing or printing, barlines (coded as  very thin round rectangles) look much thicker than it should do.

Plain viewing looks OK but printing is poor looking. Other vertical lines do not have this problem. A printing preview in evince shows the same problem, no need to actual printing on paper. 

Other viewers/printers like kpdf do this task correctly.

see samples in:
http://www.paconet.org/laserjet-png.png
http://www.paconet.org/laserjet-pdf.png

previous message discussing this issue:
http://article.gmane.org/gmane.comp.gnu.lilypond.general/33087/match=barline+thickness

BTW LilyPond outputs a .ps file, then converts it to PDF. This intermediate PS file looks OK as well, at a first glance.

Tested in Ubuntu Gutsy.
Comment 1 Francisco Vila 2007-12-12 19:58:23 UTC
Created attachment 100848 [details]
a minimal LilyPond score that shows the problem

to generate the PDF, do
lilypond minimal.ly
Comment 2 Francisco Vila 2007-12-12 20:06:58 UTC
Created attachment 100850 [details]
sample PDF output from LilyPond

This PDF is the output generated by lilypond from minimal.ly sample score. It tries to show the way in that evince renders the barline at the rightmost edge too thick, but not on normal screen, but on preview or through printer.
Comment 3 Francisco Vila 2007-12-12 20:21:24 UTC
Created attachment 100851 [details]
PS output from minimal sample score file

This is an intermediate file that LilyPond converts to PDF and it then shows the barline problem whan previewed or printed in evince.
Comment 4 Francisco Vila 2007-12-12 20:22:48 UTC
The PS code that causes the problem is at the end of the file:

113.6210 -15.8287 moveto
0.1900 4.1000 0.0000 -2.0500 0.0000 draw_round_box

draw_round_box is defined as

/draw_round_box % width height x y blot
{
        setlinewidth % w h x y
        0 setlinecap
        1 setlinejoin

        rmoveto % w h
        currentpoint % w h x1 y1
        4 2 roll % x1 y1 w h
        4 copy
        rectfill
        rectstroke
} bind def

but I have not been able to isolate this line alone in the PS file.
Comment 5 Emmanuel Fleury 2009-11-13 17:31:55 UTC
Is the problem still here ? (I don't know how to use Lillypond to test this one)
Comment 6 Francisco Vila 2009-11-13 18:26:29 UTC
Yes it is there. How to use lilypond to test this is explained in my comment above. Just use the minimal file attached as id #100848 and use it as an argument of the lilypond command. Then open the resulting PDF.

Also, in mutopiaproject.org you have 1620 lilypond-generated PDFs to test.

This bug is annoying because lilypond scores printed from evince are ugly, compare its barlines with the ones printed from lpr directly or through acroread
Comment 7 Francisco Vila 2009-11-13 18:30:15 UTC
Poppler is the guilty here, I think.
Comment 8 Milan Bouchet-Valat 2010-06-01 09:31:39 UTC
Why don't you report this to Poppler on bugs.freedesktop.org? You may get more attention there.
Comment 9 Adrian Johnson 2011-08-20 10:22:19 UTC
The problem has been fixed in poppler git. It was caused by stroking a zero width line. This is supposed to draw the thinnest line possible on the output device. As cairo does not support 0 width lines, poppler was setting the line width of a 0 width line to 1 unit. This is correct for the screen where 1 unit == 1 pixel is the thinnest line. But when printing 1 unit == 1/72" which is too thick.

I'm not sure why LilyPond wants to fill a rectangle then stroke a 0 width line around it. The second step seems to be redundant. The PDF Reference says that 0 width lines should not be used because the result is device dependent.
Comment 10 Carlos Garcia Campos 2011-08-22 07:19:24 UTC
Thanks Adrian!