lilypond-devel
[Top][All Lists]
Advanced

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

Postscript printer errors with rounded barlines?


From: Han-Wen Nienhuys
Subject: Postscript printer errors with rounded barlines?
Date: Tue, 19 Jul 2011 11:15:46 -0300

Hi guys,

I've noticed that some printer postscript interpreters add
linethickness to barlines when printed, even though they create with
draw_round_box with line thickness 0.0.  The result is that barlines
noticeably stick out of the staff; the error is in the printer, since
GV at 64x mag shows that everything is OK, and show with both the PDF
and the PS output.  Unfortunately, a small example does not trigger,
but the attached file when run through lilypond at commit
4e55f40a1bf65633fedc62d09d91d8e3c0247efe does (PDF attached).   By the
amount it sticks out, I suspect it is somehow picking up the
blotdiameter of another routine, but I have no idea how that could
happen.

I have seen this on my home printer (HP LJ 2100, with HPs postscript
extension card, configured as generic postscript in CUPS) and the
printer at my office, (Gestetner mp c2550).  This is a regression, as
I am sure it worked correctly at some point on my printer before, but
it I can't see anything obvious in the change log.

The patch below fixes it, and seems safe for inclusion, but it would
be nice if we could understand something more.

Werner, any insights?

diff --git a/ps/music-drawing-routines.ps b/ps/music-drawing-routines.ps
index 09ac055..f158b6c 100644
--- a/ps/music-drawing-routines.ps
+++ b/ps/music-drawing-routines.ps
@@ -95,8 +95,10 @@ bind def

 /draw_round_box % width height x y blot
 {
+       dup
        setlinewidth % w h x y
-       0 setlinecap
+       0.0 gt { 0 } { 2 } ifelse
+       setlinecap
        1 setlinejoin

        rmoveto % w h


-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen

Attachment: lohengrin.ly
Description: Text Data

Attachment: lohengrin.pdf
Description: Adobe PDF document


reply via email to

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