lilypond-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Porrectus (continued)


From: Jan Nieuwenhuizen
Subject: Re: [PATCH] Porrectus (continued)
Date: 02 Jan 2002 22:44:23 +0100

Juergen Reuter <address@hidden> writes:

Hi Juergen,

Sorry this reply took so long.

> Atached is a patch that should solve most of the existing problems
> with ledger lines on porrectus grobs, but also on custodes and note
> heads.

Thanks for the patch.  Technically, it looks like the right approach,
and the code looks fine, but in practice, there are some problems.

> * ledger lines no more composed from metafont symbols, but drawn
>   directly;

And that's the heart of the problem.  We very much want LilyPond
output to have a nice, rounded and fat look.  One of the important
things is that sharp edges should absolutely be avoided, especially
outside edges; all edges should be rounded with blot_diameter.
Han-Wen and I just decided that we need to reexamine contributions to
(and some of our early characters of) the feta font.

> * new paper variable ledgerlinethickness introduced that controls the
>   thickness of ledger lines; default is 2.0 times default
>   stafflinethickness;

Nitpick: please move this to scm/grob-description.scm (NoteHead,
Custos).

> * bugfix: no minimum length of ledger lines (actually, the minimum is
>   bound to blotdiameter);
> 
> * no minimum thickness of ledger lines (actually, the minimum is bound
>   to blotdiameter);

I wish this were true.  Try setting

    \paper {
      ledgerlinethickness = 0.
    }

> * elimiated duplicate code in note-head.cc / custos.cc / porrectus.cc;

Very nice.

> * bugfix: avoid empty ledger lines molecule in porrectus and custos
>   grobs (saves a little bit of memory);

Ok.

> * ledger line code now much shorter, simpler and cleaner.

Ok.

> I have still left the metafont code for ledger lines in
> feta-bolletjes.mf, but if you think my patch is ok, it probably should
> be removed.  Since the definition of draw_box in
> music-drawing-routines.ps seems to encounter blotdiameter, I do not
> see any reason to compose ledger lines from metafont symbols any more,
> right?

And here it gets nasty.  A while ago (1.4.5), I noticed that stems and
beams had sharp edges, because they are drawn in TeX using \vrule; see
scm/tex.scm (filledbox).  However, when I moved the drawing of stems
to PostScript, we stumbled upon a nasty bug in dvips (take a
TeX-related program that Knuth doesn't write, and it has bugs), that
introduces small rounding errors into the x-placement; messing-up
stem-beam and stem-notehead alignments.

We reverted this change, but I feel that we should not introduce sharp
edged ledger lines; you'll notice this, esp. because they're thicker
than stems.

You can still see the problem, when you run LilyPond with an extra scm
option, like this:

   lilypond -e "(set-lily-option 'ps-testing #t)" beam.ly

This ps-testing option makes all filledbox boxes in PostScript, see
scm/tex.scm (filledbox).

So, what *should* be done, is include your patch (modulo the paper
variable), put the ps-testing code into effect, and fix dvips...

Until there's a dvips fix, there are two things you can do: hack
something up in metafont, eg, add another (short) ledger line (or
two).  Or maybe, introduce a 'blotfilledbox' into tex.scm that uses
the PostScript "draw_box" routine; and use that for ledger lines.  It
may be that the rounding problem is not visible if the x-alignment of
ledger lines proves to be not as critical as with stems.

Greetings,
Jan.

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org




reply via email to

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