Re: Noteheads slightly too large

2016-03-02 Thread Werner LEMBERG
> 
>> Well, I don't know how can I be *completely* sure about it, but I
>> see this issue on Evince and Okular pdf readers, as well as in
>> Frescobaldi.  If you have some suggestion on how to test this
>> further, please let me know.
> 
> Frescobaldi, Evince and Okular all use the Poppler library.  On
> small sizes I see sometimes that glyphs are displayed one pixel to
> high, as if there is a rounding error.
> 
> You should let ghostscript make the drawing and look at e.g. 1200
> dpi to see if the problem lies in the Lily-generated Postscript.

See

  https://sourceforge.net/p/testlilyissues/issues/4693/#6668


Werner

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-03-02 Thread Wilbert Berendsen
Op Tue, 9 Feb 2016 07:14:45 -0700 (MST)
Gilberto Agostinho  schreef:

> Well, I don't know how can I be *completely* sure about it, but I see
> this issue on Evince and Okular pdf readers, as well as in
> Frescobaldi. If you have some suggestion on how to test this further,
> please let me know.

Frescobaldi, Evince and Okular all use the Poppler library. On small
sizes I see sometimes that glyphs are displayed one pixel to high, as
if there is a rounding error.

You should let ghostscript make the drawing and look at e.g. 1200 dpi
to see if the problem lies in the Lily-generated Postscript.

-- 
Wilbert Berendsen, musician
‣ mail: i...@wilbertberendsen.nl
‣ web: www.wilbertberendsen.nl
‣ phone: +31646122877

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-14 Thread Paul Morris
Hi Pierre,

> On Feb 10, 2016, at 4:08 AM, Pierre Perol-Schneider 
>  wrote:
> 
> Finally, after all types of trials, using 'stencil-scale is definitely the 
> best workaround to reach an acceptable note head output:
> 
> #(set-global-staff-size 180)  %% <= below scales and offsets were set at 
> #(set-global-staff-size 300) and controlled at zoom #2000 
> #(set-default-paper-size "a4" 'landscape)
> 
> \layout {
>   indent = 0
>   \context {
> \Staff
> \omit Clef
> \omit TimeSignature
>   }
> }
> 
> \relative {
>   \override NoteHead.stencil = 
> #(lambda (grob) (ly:stencil-scale (ly:note-head::print grob) 0.980  
> 0.924))
>   \override NoteHead.extra-offset = #'(0 . -.001)
>   d'4*1/2 f2*1/4 a1*1/8 c\breve*1/16 e\longa*1/32 
> }

Looks good!  Nice to have a workaround for this until the font itself is 
adjusted (assuming it will be).

Cheers,
-Paul
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-14 Thread Carl Sorensen
Paul Morris wrote
>> On Feb 14, 2016, at 10:11 AM, David Kastrup 

> dak@

>  wrote:
>> 
>> Your image only shows notes between staff lines.  However, a reduction
>> in notehead size will mainly make notes _on_ staff lines look too small
>> and/or unsymmetric so the image is not really useful for judging
>> potential _downsides_ of that change.  Can you do a more complete image,
>> including ledger lines and larger note values (half, semibreve, breve,
>> longa)?
> 
> Maybe also include an example with some note heads that are colored so you
> can see better how they overlap with the staff lines?  i.e. with 
> 
> \override NoteHead.color = #blue

I've attached an image with green noteheads that shows spaces, staff lines,
and ledger lines (all at a setting of Overdone_heads = -0.2, which reduces
the metafont notehead size by 20% of the staff line thickness).

 

Here are three images  that come from a test with various durations.

 

 

 

I believe the changes are so minute that they cannot be seen when the note
is on a staff line.  The symmetry of the note is unchanged; only its height
is adjusted.

pdf files with three different settings for overdone_heads and the noteheads
in green are available on the tracker issue: 
https://sourceforge.net/p/testlilyissues/issues/4693/
  

Thanks,

Carl





--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187226.html
Sent from the Bugs mailing list archive at Nabble.com.

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-14 Thread David Kastrup
Carl Sorensen  writes:

> The feta font files specify the notehead height to be exactly staff_space +
> staff_line_thickness.  I am assuming that in the conversion from ps to type1
> font with hinting, the notehead gets just a bit larger.
>
> I have rebuilt the feta font with a notehead height of staff_space + 0.8 *
> staff_line_thickness. It seems to avoid the overlap problem, but still
> appears to be full width.
>
> If this is acceptable, I will prepare a patch.
>
> Thanks,
>
> Carl
>  

Your image only shows notes between staff lines.  However, a reduction
in notehead size will mainly make notes _on_ staff lines look too small
and/or unsymmetric so the image is not really useful for judging
potential _downsides_ of that change.  Can you do a more complete image,
including ledger lines and larger note values (half, semibreve, breve,
longa)?

-- 
David Kastrup

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-14 Thread Carl Sorensen
The feta font files specify the notehead height to be exactly staff_space +
staff_line_thickness.  I am assuming that in the conversion from ps to type1
font with hinting, the notehead gets just a bit larger.

I have rebuilt the feta font with a notehead height of staff_space + 0.8 *
staff_line_thickness. It seems to avoid the overlap problem, but still
appears to be full width.

If this is acceptable, I will prepare a patch.

Thanks,

Carl
 



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187152.html
Sent from the Bugs mailing list archive at Nabble.com.

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-14 Thread Paul Morris
> On Feb 14, 2016, at 10:11 AM, David Kastrup  wrote:
> 
> Your image only shows notes between staff lines.  However, a reduction
> in notehead size will mainly make notes _on_ staff lines look too small
> and/or unsymmetric so the image is not really useful for judging
> potential _downsides_ of that change.  Can you do a more complete image,
> including ledger lines and larger note values (half, semibreve, breve,
> longa)?

Maybe also include an example with some note heads that are colored so you can 
see better how they overlap with the staff lines?  i.e. with 

\override NoteHead.color = #blue

Thanks,
-Paul
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-10 Thread tisimst
On Wed, Feb 10, 2016 at 3:10 AM, Andrew Bernard [via Lilypond] <
ml-node+s1069038n187069...@n5.nabble.com> wrote:

> Hi Abraham,
>
> Thanks for this explanation. Now that I have read up on this, for TrueType
> at least, I see that FUnits, or font units are used, and that there are a
> given number of units-per-em for a specific design, say 1000 or 2048 and so
> on. I can’t find much reference to em-units - to me that suggests 'units of
> em’s'. Would it not be units per em? I assume this is what you are
> referring to, that fonts designed for lilypond are made with a metric of
> 1000 font units per em.
>

It's definitely possible I'm using improper terminology. What you are
saying is probably more accurate. I guess there isn't a consensus as to
what to call the font units (not that they need to). So, yes, in music
fonts, a staff height has traditionally been 1000 units-per-em. Thanks for
correcting me.

Best,
Abraham




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187084.html
Sent from the Bugs mailing list archive at Nabble.com.
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-10 Thread Andrew Bernard
Hi Abraham,

Thanks for this explanation. Now that I have read up on this, for TrueType at 
least, I see that FUnits, or font units are used, and that there are a given 
number of units-per-em for a specific design, say 1000 or 2048 and so on. I 
can’t find much reference to em-units - to me that suggests 'units of em’s'. 
Would it not be units per em? I assume this is what you are referring to, that 
fonts designed for lilypond are made with a metric of 1000 font units per em.

Andrew

On 10 February 2016 at 18:45:21, tisimst (tisimst.lilyp...@gmail.com) wrote:

What I'm referring to are the units that are used to define the shape of a 
glyph, called em-units.
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-10 Thread Werner LEMBERG

> Most fonts are usually defined relative to a resolution of a
> 1000em-unit scale,

Normally used for third-order Bézier outlines (Type1, CFF).

> a 1024em-unit scale or a 2048em-unit scale.

Normally used for second-order Bézier outlines (TrueType).

Note that this is really a convenience thing, as Abraham has already
stated.  You can find TrueType fonts that use 1000upem (units per EM)
as the designsize, and some CJK fonts use 256upem to make the font
smaller.


Werner
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-10 Thread Pierre Perol-Schneider
Hi Paul,

Finally, after all types of trials, using 'stencil-scale is definitely the
best workaround to reach an acceptable note head output:

#(set-global-staff-size 180)  %% <= below scales and offsets were set at
#(set-global-staff-size 300) and controlled at zoom #2000
#(set-default-paper-size "a4" 'landscape)

\layout {
  indent = 0
  \context {
\Staff
\omit Clef
\omit TimeSignature
  }
}

\relative {
  \override NoteHead.stencil =
#(lambda (grob) (ly:stencil-scale (ly:note-head::print grob) 0.980
0.924))
  \override NoteHead.extra-offset = #'(0 . -.001)
  d'4*1/2 f2*1/4 a1*1/8 c\breve*1/16 e\longa*1/32
}

Cheers,
Pierre

2016-02-10 6:05 GMT+01:00 Paul Morris :

> Hi Pierre,
>
> On Feb 9, 2016, at 4:30 PM, Pierre Perol-Schneider <
> pierre.schneider.pa...@gmail.com> wrote:
>
> Some thoughts regarding the use of ly:stencil-scale:
> 1. the command seems to have a side effect on the stem attachment (or
> probably no effect on the note head extents - tested on a W8 OS)
> 2. applying it on all note heads suppose that all glyphs have the same
> scale defects (which is not the case, see my example with the harmonic
> style).
>
> So here's my attempt to get something liable to all note head styles.
> Unfortunately I did note find any direct procedure to get the 'default
> style ( '() do not work):
>
>
> Well, I was only intending that code for testing purposes.  Looks like
> you’ve got a good start on something for actual use.
>
> Cheers,
> -Paul
>
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread Gilberto Agostinho
Hi Urs,


Urs Liska wrote
> Are you completely sure that the issue is in LilyPond's output and not in
> the displaying program?

Well, I don't know how can I be *completely* sure about it, but I see this
issue on Evince and Okular pdf readers, as well as in Frescobaldi. If you
have some suggestion on how to test this further, please let me know.

Cheers,
Gilberto



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187039.html
Sent from the Bugs mailing list archive at Nabble.com.

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread tisimst
Gilberto, et al,

On Tue, Feb 9, 2016 at 7:14 AM, Gilberto Agostinho [via Lilypond] <
ml-node+s1069038n187039...@n5.nabble.com> wrote:

> Hi Urs,
>
> Urs Liska wrote
> Are you completely sure that the issue is in LilyPond's output and not in
> the displaying program?
>
> Well, I don't know how can I be *completely* sure about it, but I see this
> issue on Evince and Okular pdf readers, as well as in Frescobaldi. If you
> have some suggestion on how to test this further, please let me know.


WARNING!! TECHNICAL ANALYSIS AHEAD!! ;-)

Although microscopic, I can confirm this is true at the font level (at
least at the default printed 20pt size, I didn't check the other optical
variants). Relative to a 1000-em unit staff height (which is what the fonts
are designed to, center of bottom staff line to center of top staff line),
here are the dimensions causing the problem you are seeing:

staff-space = 250-em
staff line thickness = 25-em (i.e., 0.1 staff-space)
solid notehead height = 276-em

Now, here's the discrepancy. The distance between the bottom of a staff
line to the top of the next staff line up, is 250+25 = 275-em. That means
that there is an overall difference in size of 1-em unit (at the 20pt
printed size, this equates to 1/50pt = 0.00028in = 0.0071mm difference). In
other words, we are technically splitting hairs with this, but nonetheless,
it is a difference. The solid notehead is "too large" by 1/100pt on either
side.

I'm not sure if this warrants a design change or not, but there, at least,
is the evidence. It's not just the PDF reader. I've looked it over with
many different readers in both PDF and SVG backends and it always shows up.
Well, there's why.

HTH,
Abraham




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187044.html
Sent from the Bugs mailing list archive at Nabble.com.
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread Simon Albrecht

On 09.02.2016 15:14, Gilberto Agostinho wrote:

I see this
issue on Evince and Okular pdf readers, as well as in Frescobaldi. If you
have some suggestion on how to test this further, please let me know.


Well, it’s known that on-screen display is often inexact. You might try 
other backends (SVG, PNG), else the best way of testing is printing it 
on paper.


Yours, Simon

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread Gilberto Agostinho
Hi Schneidy,


Schneidy wrote
> Here's a workaround

That doesn't seem to work for me, I still get the noteheads creeping out the
staff lines, and if I lower the magnification value more (like 0.98 or less)
the noteheads suddenly get *much* smaller, leaving a hole in between them
and the staff lines.

But this is all besides the point, I simply raised this issue because I
think this should be fixed directly in source code, particularly given that
we take big pride in these minute engraving details that LilyPond normally
takes care of while other software fail to do. But for my own work which I
print in A4 paper, I really can't see this as an issue at all, so I am not
"affected" by it in this sense.

Cheers,
Gilberto



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187037.html
Sent from the Bugs mailing list archive at Nabble.com.

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread Urs Liska


Am 9. Februar 2016 14:59:45 MEZ, schrieb Gilberto Agostinho 
:
>Hi Schneidy,
>
>
>Schneidy wrote
>> Here's a workaround
>
>That doesn't seem to work for me, I still get the noteheads creeping
>out the
>staff lines, and if I lower the magnification value more (like 0.98 or
>less)
>the noteheads suddenly get *much* smaller, leaving a hole in between
>them
>and the staff lines.
>
>But this is all besides the point, I simply raised this issue because I
>think this should be fixed directly in source code, particularly given
>that
>we take big pride in these minute engraving details that LilyPond
>normally
>takes care of while other software fail to do. But for my own work
>which I
>print in A4 paper, I really can't see this as an issue at all, so I am
>not
>"affected" by it in this sense.

Are you completely sure that the issue is in LilyPond's output and not in the 
displaying program?

I agree that LilyPond should take this kind of issues seriously,  but there 
sometimes are more candidates fir causing them.

Urs

>
>Cheers,
>Gilberto
>
>
>
>--
>View this message in context:
>http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187037.html
>Sent from the Bugs mailing list archive at Nabble.com.
>
>___
>bug-lilypond mailing list
>bug-lilypond@gnu.org
>https://lists.gnu.org/mailman/listinfo/bug-lilypond

-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread Gilberto Agostinho
Hi Simon,


Simon Albrecht-2 wrote
> You might try 
> other backends (SVG, PNG), else the best way of testing is printing it 
> on paper.

So I tried this:

#(set-global-staff-size 90)
{
  c' d' e' f'
}

Then exported a png via Frescobaldi using resolution 1200 and in Publish
mode, and here is a crop of the result:

 

If you still judge that printing is necessary, I can try doing it next week
since I don't have a printer home.

Cheers,
Gilberto



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187042.html
Sent from the Bugs mailing list archive at Nabble.com.

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread Gilberto Agostinho
Hi Paul,


Paul Morris wrote
> Interesting...  Here’s some code for experimenting with this.  It scales
> notehead stencils. A scaling of 250/276 should make the solid notes equal
> to one staff-space.  (Or should it be 275/276 to make it the "distance
> between the bottom of a staff line to the top of the next staff line up”?)

The scaling of the notehead grob in your code indeed solves it, I used the
same resolution and zoom level as in the last png I posted and the notehead
is properly contained by the staves.

Cheers,
Gilberto




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187047.html
Sent from the Bugs mailing list archive at Nabble.com.

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread tisimst
On Tue, Feb 9, 2016 at 8:49 AM, Paul Morris [via Lilypond] <
ml-node+s1069038n187046...@n5.nabble.com> wrote:

> > On Feb 9, 2016, at 10:12 AM, tisimst <[hidden email]
> > wrote:
> >
> > Although microscopic, I can confirm this is true at the font level (at
> > least at the default printed 20pt size, I didn't check the other optical
> > variants). Relative to a 1000-em unit staff height (which is what the
> fonts
> > are designed to, center of bottom staff line to center of top staff
> line),
> > here are the dimensions causing the problem you are seeing:
> >
> > staff-space = 250-em
> > staff line thickness = 25-em (i.e., 0.1 staff-space)
> > solid notehead height = 276-em
> >
> > Now, here's the discrepancy. The distance between the bottom of a staff
> > line to the top of the next staff line up, is 250+25 = 275-em. That
> means
> > that there is an overall difference in size of 1-em unit (at the 20pt
> > printed size, this equates to 1/50pt = 0.00028in = 0.0071mm difference).
> In
> > other words, we are technically splitting hairs with this, but
> nonetheless,
> > it is a difference. The solid notehead is "too large" by 1/100pt on
> either
> > side.
>
> Interesting...  Here’s some code for experimenting with this.  It scales
> notehead stencils. A scaling of 250/276 should make the solid notes equal
> to one staff-space.  (Or should it be 275/276 to make it the "distance
> between the bottom of a staff line to the top of the next staff line up”?)
>
> -Paul
>
>
> \version "2.19.36"
>
> example = \relative {
>   c' d e f g a b c
> }
>
> {
>   \example
> }
>
> {
>   \override NoteHead.stencil =
>   #(lambda (grob)
>  (ly:stencil-scale
>   (ly:note-head::print grob)
>   250/276  250/276))
>
>   \example
> }
>

Well, that depends on where you want the top/bottom of the notehead to
touch the staff-lines:
- 275/276 - If you want it to have the same vertical extent as the two
touch staff lines.
- 250/276 - If you want it to touch the centers of the staff lines
- 225/276 - If you wanted them to fit perfectly withing the staff lines

HTH,
Abraham




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187048.html
Sent from the Bugs mailing list archive at Nabble.com.
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread Paul Morris
> On Feb 9, 2016, at 10:12 AM, tisimst  wrote:
> 
> Although microscopic, I can confirm this is true at the font level (at
> least at the default printed 20pt size, I didn't check the other optical
> variants). Relative to a 1000-em unit staff height (which is what the fonts
> are designed to, center of bottom staff line to center of top staff line),
> here are the dimensions causing the problem you are seeing:
> 
> staff-space = 250-em
> staff line thickness = 25-em (i.e., 0.1 staff-space)
> solid notehead height = 276-em
> 
> Now, here's the discrepancy. The distance between the bottom of a staff
> line to the top of the next staff line up, is 250+25 = 275-em. That means
> that there is an overall difference in size of 1-em unit (at the 20pt
> printed size, this equates to 1/50pt = 0.00028in = 0.0071mm difference). In
> other words, we are technically splitting hairs with this, but nonetheless,
> it is a difference. The solid notehead is "too large" by 1/100pt on either
> side.

Interesting...  Here’s some code for experimenting with this.  It scales 
notehead stencils. A scaling of 250/276 should make the solid notes equal to 
one staff-space.  (Or should it be 275/276 to make it the "distance between the 
bottom of a staff line to the top of the next staff line up”?)

-Paul


\version "2.19.36"

example = \relative {
  c' d e f g a b c
}

{
  \example
}

{
  \override NoteHead.stencil =
  #(lambda (grob)
 (ly:stencil-scale
  (ly:note-head::print grob)
  250/276  250/276))

  \example
}




___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread Pierre Perol-Schneider
Hi Paul,


2016-02-09 16:48 GMT+01:00 Paul Morris :


> \version "2.19.36"
>
> example = \relative {
>   c' d e f g a b c
> }
>
> {
>   \example
> }
>
> {
>   \override NoteHead.stencil =
>   #(lambda (grob)
>  (ly:stencil-scale
>   (ly:note-head::print grob)
>   250/276  250/276))
>
>   \example
> }
>

Some thoughts regarding the use of ly:stencil-scale:
1. the command seems to have a side effect on the stem attachment (or
probably no effect on the note head extents - tested on a W8 OS)
2. applying it on all note heads suppose that all glyphs have the same
scale defects (which is not the case, see my example with the harmonic
style).

So here's my attempt to get something liable to all note head styles.
Unfortunately I did note find any direct procedure to get the 'default
style ( '() do not work):

\version "2.19.36"
#(set-global-staff-size 180)
#(set-default-paper-size "a4" 'landscape)

#(define (my-note-heads grob)
   (let* ((style (ly:grob-property grob 'style))
  (duration (ly:grob-property grob 'duration-log)))
(case duration
   ((-1)
(lambda (grob)
(ly:stencil-scale
  (ly:note-head::print grob)
  268/276  261/276)))
   ((0)
(lambda (grob)
(ly:stencil-scale
  (ly:note-head::print grob)
  268/276  262/276)))
   ((1)
(lambda (grob)
(ly:stencil-scale
  (ly:note-head::print grob)
  268/276  263/276)))
   ((2)
(lambda (grob)
(ly:stencil-scale
  (ly:note-head::print grob)
  268/276  264/276)))
   (else (ly:note-head::print grob)

#(define (my-note-heads-new grob)
   (let* ((style (ly:grob-property grob 'style))
  (duration (ly:grob-property grob 'duration-log)))
;; "TODO: this means that 'my-note-heads-new
;; should apply only for the 'default style
;; does not work here though!
 ;(case style
   ;(('())
(case duration
   ((-1)
(grob-interpret-markup grob
  #{
\markup {
  \scale #'(0.98 . 0.96)
  \musicglyph #"noteheads.sM1"
}
  #}))
   ((0)
(grob-interpret-markup grob
  #{
\markup {
  \scale #'(0.98 . 0.95)
  \musicglyph #"noteheads.s0"
}
  #}))
   ((1)
(grob-interpret-markup grob
  #{
\markup {
  \scale #'(0.98 . 0.95)
  \musicglyph #"noteheads.s1"
}
  #}))
   ((2)
(grob-interpret-markup grob
  #{
\markup {
  \scale #'(0.98 . 0.95)
  \musicglyph #"noteheads.s2"
}
  #}))
  ;((harmonic)
   ;   (grob-interpret-markup grob
   ; #{
   ;  \markup {
   ; \scale #'(0.98 . 0.94)
;\musicglyph #"noteheads.s0harmonic"
   ;   }
;#}))
   (else (ly:note-head::print grob)

%% Test 1:
\relative {
  \override Staff.NoteHead.stencil = #my-note-heads
  %\override Staff.NoteHead.stencil = #my-note-heads-new
  d'4 f2*1/2 a1*1/4 c\breve*1/8
%% Test 2:
  %d'4 f2*1/2\harmonic a1*1/4 c\breve*1/8
}

Cheers,
Pierre
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread Pierre Perol-Schneider
Send it again with something more homogeneous:

%%
\version "2.19.36"
#(set-global-staff-size 180)
#(set-default-paper-size "a4" 'landscape)

#(define (my-note-heads grob)
   (let* ((style (ly:grob-property grob 'style))
  (duration (ly:grob-property grob 'duration-log)))
(case duration
   ((-1)
(lambda (grob)
(ly:stencil-scale
  (ly:note-head::print grob)
  268/276  261/276)))
   ((0)
(lambda (grob)
(ly:stencil-scale
  (ly:note-head::print grob)
  268/276  262/276)))
   ((1)
(lambda (grob)
(ly:stencil-scale
  (ly:note-head::print grob)
  268/276  263/276)))
   ((2)
(lambda (grob)
(ly:stencil-scale
  (ly:note-head::print grob)
  268/276  264/276)))
   (else (ly:note-head::print grob)

#(define (my-note-heads-new grob)
   (let* ((style (ly:grob-property grob 'style))
  (duration (ly:grob-property grob 'duration-log)))
;; "TODO: this means that 'my-note-heads-new
;; should apply only for the 'default style
;; does not work here though!
 ;(case style
   ;(('())
(case duration
   ((-1)
(grob-interpret-markup grob
  #{
\markup {
  \scale #'(268/276 . 261/276)
  \musicglyph #"noteheads.sM1"
}
  #}))
   ((0)
(grob-interpret-markup grob
  #{
\markup {
  \scale #'(268/276 . 262/276)
  \musicglyph #"noteheads.s0"
}
  #}))
   ((1)
(grob-interpret-markup grob
  #{
\markup {
  \scale #'(268/276 . 263/276)
  \musicglyph #"noteheads.s1"
}
  #}))
   ((2)
(grob-interpret-markup grob
  #{
\markup {
  \scale #'(268/276 . 264/276)
  \musicglyph #"noteheads.s2"
}
  #}))
  ;((harmonic)
   ;   (grob-interpret-markup grob
   ; #{
   ;  \markup {
   ; \scale #'(0.98 . 0.94)
;\musicglyph #"noteheads.s0harmonic"
   ;   }
;#}))
   (else (ly:note-head::print grob)

%% Test 1:
\relative {
  %\override Staff.NoteHead.stencil = #my-note-heads
  \override Staff.NoteHead.stencil = #my-note-heads-new
  d'4 f2*1/2 a1*1/4 c\breve*1/8
%% Test 2:
  %d'4 f2*1/2\harmonic a1*1/4 c\breve*1/8
}
%

Cheers,
Pierre
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread Andrew Bernard
Hi Abraham,

What unit is this particular em? In typography at least an em is a measurement 
equal to the currently specified point size for a font. That does not seem to 
fit your analysis here.

Andrew

On 10 February 2016 at 02:12:48, tisimst (tisimst.lilyp...@gmail.com) wrote:

Relative to a 1000-em unit staff height (which is what the fonts 
are designed to, center of bottom staff line to center of top staff line)
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread Paul Morris
Hi Pierre,

> On Feb 9, 2016, at 4:30 PM, Pierre Perol-Schneider 
>  wrote:
> 
> Some thoughts regarding the use of ly:stencil-scale:
> 1. the command seems to have a side effect on the stem attachment (or 
> probably no effect on the note head extents - tested on a W8 OS)
> 2. applying it on all note heads suppose that all glyphs have the same scale 
> defects (which is not the case, see my example with the harmonic style).
> 
> So here's my attempt to get something liable to all note head styles.
> Unfortunately I did note find any direct procedure to get the 'default style 
> ( '() do not work):

Well, I was only intending that code for testing purposes.  Looks like you’ve 
got a good start on something for actual use.

Cheers,
-Paul
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread tisimst
Andrew,

On Tue, Feb 9, 2016 at 6:13 PM, Andrew Bernard [via Lilypond] <
ml-node+s1069038n187064...@n5.nabble.com> wrote:

> What unit is this particular em? In typography at least an em is a
> measurement equal to the currently specified point size for a font. That
> does not seem to fit your analysis here.


This is a good question, and my apologies for just throwing it out
there without defining it properly. I think what you are referring to is a
little different. An "em", like with an "em-dash" is defined as something
that has the same width as the capitol letter "M" in that typeface,
irrespective of pt size. The relative size is the same at 8pt as at 96pt.

What I'm referring to are the units that are used to define the shape of a
glyph, called em-units. These don't have anything to do with the displayed
size. Here's an example. It is fairly common in a text font to make the
capital letter "M" around 800-em units tall. "em-units" are just for
defining a relative scale. As the Wikipedia article[1] states it (under the
"History" section, 2nd paragraph):

"*In digital type, the em is a grid of arbitrary resolution that is used as
the design space of a digital font.*" That's all I mean.

Most fonts are usually defined relative to a resolution of a 1000em-unit
scale, a 1024em-unit scale or a 2048em-unit scale. In virtually all music
fonts, glyphs are defined relative to a 1000-em unit staff-size (center of
bottom line to center of top line), which makes a single staff-space equal
to 250-em units. It's just a convenience thing.

HTH,
Abraham

[1] https://en.wikipedia.org/wiki/Em_%28typography%29




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187066.html
Sent from the Bugs mailing list archive at Nabble.com.
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-08 Thread Pierre Perol-Schneider
Hi Gilberto,

Here's a workaround:

\version "2.19.36"

\relative \magnifyMusic 0.99 %% <= or?
{
  c'1 d2 e4 f g a b c
}

Cheers,
Pierre

2015-12-11 12:37 GMT+01:00 Gilberto Agostinho :

> Hi bug squad,
>
> This one is really nitpicking, but by zooming in on a note located in
> between two staff lines, we can notice that the noteheads always extend a
> little tiny bit beyond the top staff. See:
>
> 
>
> Elaine Gould, in her book /Behind Bars/, states that "[t]he notehead fills
> the space, touching the stave-line on each side of it, but without
> extending
> beyond either line" (p. 10).
>
> Cheers,
> Gilberto
>
>
>
> --
> View this message in context:
> http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659.html
> Sent from the Bugs mailing list archive at Nabble.com.
>
> ___
> bug-lilypond mailing list
> bug-lilypond@gnu.org
> https://lists.gnu.org/mailman/listinfo/bug-lilypond
>
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2015-12-12 Thread Urs Liska
Am 12.12.2015 um 11:11 schrieb Simon Albrecht:
> On 12.12.2015 00:43, Urs Liska wrote:
>>
>> Am 12.12.2015 um 00:02 schrieb Simon Albrecht:
>>> Thanks for the report.
>>> 
>> This *may* be intended, which should be checked - if someone recalls any
>> discussion.
>> At least I recall speaking someone from a major publishing house about
>> how they created their own music font, and specifically made it do what
>> the OP reported.
> 
> Interesting – I couldn’t imagine a reason to do so, but I’d be curious
> to learn.

I'm sorry, my recollection is too vague. But if I should give a guess
I'd say it is to achieve more boldness in appearance.

Urs

> Yet there’s also the quote from Elaine Gould, confirming the ‘common
> sense’ of: it shouldn’t protrude at all beyond the staff line.
> Discussion in the tracker welcome :-)
> 
> Yours, Simon
> 

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2015-12-11 Thread Urs Liska


Am 12.12.2015 um 00:02 schrieb Simon Albrecht:
> Thanks for the report.
> 

This *may* be intended, which should be checked - if someone recalls any
discussion.
At least I recall speaking someone from a major publishing house about
how they created their own music font, and specifically made it do what
the OP reported.

Urs

>
> On 11.12.2015 12:37, Gilberto Agostinho wrote:
>> Hi bug squad,
>>
>> This one is really nitpicking, but by zooming in on a note located in
>> between two staff lines, we can notice that the noteheads always
>> extend a
>> little tiny bit beyond the top staff. See:
>>
>> 
>>
>> Elaine Gould, in her book /Behind Bars/, states that "[t]he notehead
>> fills
>> the space, touching the stave-line on each side of it, but without
>> extending
>> beyond either line" (p. 10).
>>
>> Cheers,
>> Gilberto
>>
>>
>>
>> -- 
>> View this message in context:
>> http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659.html
>> Sent from the Bugs mailing list archive at Nabble.com.
>>
>> ___
>> bug-lilypond mailing list
>> bug-lilypond@gnu.org
>> https://lists.gnu.org/mailman/listinfo/bug-lilypond
>
>
> ___
> bug-lilypond mailing list
> bug-lilypond@gnu.org
> https://lists.gnu.org/mailman/listinfo/bug-lilypond


___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond