lilypond-user
[Top][All Lists]
Advanced

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

Re: Clipping of ornamentation glyphs


From: Werner LEMBERG
Subject: Re: Clipping of ornamentation glyphs
Date: Fri, 27 Oct 2023 16:12:59 +0000 (UTC)

> I just noticed something with both that version of the documentation
> as well as 2.25 [1].  The curl of the "up" or "down" is getting
> clipped at the top and bottom of the ornamentation snippets.
> However, "line" seems to be intact.  Are the bounds of these curl
> glyphs not being calculated correctly in the underlying font?  Or is
> something else causing the snippets to clip too tightly?

As can be seen in the attached image, the box information in the
Metafont source code used internally by LilyPond to place objects
doesn't always encompass the whole glyph shape.  This is intentional,
mostly due to the historical development of LilyPond – in the
beginning, there weren't skylines.

I'm not sure whether LilyPond will ever be able to avoid cropping
completely.  It's not a trivial task, AFAIK, and it would mean a lot
of work to fix it.

To get properly cropped images you can use the `pdfcrop` tool (from
TeXLive or CTAN), for example.  It internally uses Ghostscript to
render a high-resolution image, which in turn is used to derive a
proper bounding box.  I've attached such a PDF using this code

```prallup.ly
{
  \omit Staff.TimeSignature
  f''^\prallup e'_\prallup b'\prallup
}

\paper { tagline = ##f }
```

and created with

```
lilypond prallup.ly
pdfcrop --hires prallup.pdf prallup.cropped.pdf
```


    Werner

PNG image

Attachment: prallup.cropped.pdf
Description: Adobe PDF document


reply via email to

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