From 87eb2f9fe1be3a532675fe4b7322bbba5a60ba5c Mon Sep 17 00:00:00 2001 From: Carl Sorensen Date: Sat, 5 Mar 2016 21:30:46 -0700 Subject: [PATCH] Use a negative value of overdone_noteheads to shrink the head slightly --- input/regression/notehead-height.ly | 15 +++++++++++++++ mf/feta-params.mf | 14 +++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 input/regression/notehead-height.ly diff --git a/input/regression/notehead-height.ly b/input/regression/notehead-height.ly new file mode 100644 index 0000000000..a4f28d6b47 --- /dev/null +++ b/input/regression/notehead-height.ly @@ -0,0 +1,15 @@ +\version "2.19.38" + +\header { + texidoc=" +Noteheads do not extend above the upper staff line +" +} + +\new Voice \with { + \override NoteHead.color = #green + } { + \relative { + f'4 a c e \bar "|." + } +} diff --git a/mf/feta-params.mf b/mf/feta-params.mf index 7f7f4a5cc2..81325dc46e 100644 --- a/mf/feta-params.mf +++ b/mf/feta-params.mf @@ -238,7 +238,19 @@ slash_thick# := 2/3 * 0.48 staff_space#; % the lines. If you like that, modify overdone heads (unit: % stafflinethickness). % -overdone_heads = 0.0; + +%% FIXME +% There is a problem with noteheads slightly extending beyond the staff +% lines. This is due to the fact that staff_space + stafflinethickness +% is sometimes an odd number, so the nothead height and depth are not +% integers. Then, when the font is converted to an outline font, the +% system rounds up the 0.5 left over from dividing the notehead height +% in two, and the notehead extends slightly beyond the staff line. +% In order to resolve this problem, we use overdone_heads to slightly +% reduce the notehead height. Empirically, we have determined that +% reducing by 10% of stafflinethickness solves the problem. + +overdone_heads = -0.1; noteheight# := staff_space# + (1 + overdone_heads) * stafflinethickness#; define_pixels (slash_thick); -- 2.39.2