From e06685f65cfb6d62fbffdbb883639849c67de159 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 21 May 2002 22:39:24 +0000 Subject: [PATCH] input/bugs cleanup --- ChangeLog | 6 ++ input/bugs/accid.ly | 11 --- input/bugs/accidental-collision.ly | 16 ---- input/bugs/braces.ly | 83 -------------------- input/{bugs/time.ly => test/ancient-time.ly} | 1 + lily/afm.cc | 3 +- mf/GNUmakefile | 6 +- mf/feta-beugel.mf | 18 ++++- 8 files changed, 28 insertions(+), 116 deletions(-) delete mode 100644 input/bugs/accid.ly delete mode 100644 input/bugs/accidental-collision.ly delete mode 100644 input/bugs/braces.ly rename input/{bugs/time.ly => test/ancient-time.ly} (69%) diff --git a/ChangeLog b/ChangeLog index b4746929db..e09aae12ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2002-05-22 Han-Wen + * mf/feta-beugel.mf (code): use autometric macros for braces. + This fixes input/bugs/braces. + + * lily/afm.cc (count): return numOfChars, not size of array + (always equals 256.) + * lily/script.cc (before_line_breaking): postpone setting the X-parent of vertical scripts. This fixes the case of scripts on chords with seconds diff --git a/input/bugs/accid.ly b/input/bugs/accid.ly deleted file mode 100644 index c04b3dddaa..0000000000 --- a/input/bugs/accid.ly +++ /dev/null @@ -1,11 +0,0 @@ -\header { -texidoc="The sharp is printed too far to the left." -} - -\version "1.4.0" -\score { -\notes \context Staff < - \context Voice = up {\stemUp gis''4} - \context Voice = dwn {\stemDown } -> -} diff --git a/input/bugs/accidental-collision.ly b/input/bugs/accidental-collision.ly deleted file mode 100644 index 38440668d7..0000000000 --- a/input/bugs/accidental-collision.ly +++ /dev/null @@ -1,16 +0,0 @@ -\header { -texidoc="The two sharps overstrike, the flat and sharp overstrike" -} -\version "1.3.148" - -\include "paper16.ly" -\score { - \notes { - \relative c'' \context Voice \sequential { - - } - } - \paper{ - linewidth = 5.0\cm - } -} diff --git a/input/bugs/braces.ly b/input/bugs/braces.ly deleted file mode 100644 index 94ee08db13..0000000000 --- a/input/bugs/braces.ly +++ /dev/null @@ -1,83 +0,0 @@ -\version "1.3.148" - - -\header { -texidoc = "Braces at different sizes don't attach exactly to the staffs. -Previously, some braces were too small, while others were too big; this was -apparently caused by dvips + mf rounding. Now, braces are just a bit -too big." -} - -\include "paper11.ly" -\paper { linewidth = -1.0 } - -\score { - \context GrandStaff < - \context Staff = a \notes c''1 - \context Staff = b \notes c''1 - > -} - - -\include "paper13.ly" -\paper { linewidth = -1.0 } - -\score { - \context GrandStaff < - \context Staff = a \notes c''1 - \context Staff = b \notes c''1 - > - \paper { - \translator { - \GrandStaffContext - SystemStartDelimiter \override #'weird = #-5 - } - } -} - - -\include "paper16.ly" -\paper { linewidth = -1.0 } - -\score { - \context GrandStaff < - \context Staff = a \notes c''1 - \context Staff = b \notes c''1 - > - \paper { - \translator { - \GrandStaffContext - SystemStartDelimiter \override #'weird = #5 - } - } -} - - -\include "paper20.ly" -\paper { linewidth = -1.0 } - -\score { - \context GrandStaff < - \context Staff = a \notes c''1 - \context Staff = b \notes c''1 - > - \paper { - \translator { - \GrandStaffContext - SystemStartDelimiter \override #'weird = #-7 - } - } -} - - -\include "paper26.ly" -\paper { linewidth = -1.0 } - -\score { - \context GrandStaff < - \context Staff = a \notes c''1 - \context Staff = b \notes c''1 - \context Staff = c \notes c''1 - \context Staff = d \notes c''1 - > -} diff --git a/input/bugs/time.ly b/input/test/ancient-time.ly similarity index 69% rename from input/bugs/time.ly rename to input/test/ancient-time.ly index 3ffea816de..544aeda2a8 100644 --- a/input/bugs/time.ly +++ b/input/test/ancient-time.ly @@ -6,6 +6,7 @@ texidoc="Should use old style." \score { \notes { \property Staff.TimeSignature \override #'style = #'oldC4/4 + \property Staff.TimeSignature \override #'font-family = #'ancient s1 } } diff --git a/lily/afm.cc b/lily/afm.cc index 1c760a1813..dc5c551968 100644 --- a/lily/afm.cc +++ b/lily/afm.cc @@ -83,7 +83,8 @@ Adobe_font_metric::find_char_metric (String nm, bool warn) const int Adobe_font_metric::count () const { - return ascii_to_metric_idx_.size (); + return font_inf_->numOfChars ; + // return ascii_to_metric_idx_.size (); } Box diff --git a/mf/GNUmakefile b/mf/GNUmakefile index f7fa87e2a0..ca60bbb4b3 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -13,9 +13,11 @@ EXTRA_DIST_FILES += README feta.tex # don't try to make fonts from test files TEST_FILES = $(wildcard *test*.mf) FET_FILES = $(filter-out $(TEST_FILES),\ - $(wildcard feta[0-9]*.mf) $(wildcard parmesan[0-9]*.mf)) + $(wildcard feta[0-9]*.mf) $(wildcard parmesan[0-9]*.mf))\ + $(wildcard feta-braces*[0-9].mf) + FONT_FILES = $(filter-out $(TEST_FILES),\ -$(wildcard feta*[0-9].mf) $(wildcard parmesan*[0-9].mf)) + $(wildcard feta*[0-9].mf) $(wildcard parmesan*[0-9].mf)) \ XPM_FONTS = feta20 feta-nummer10 feta-braces20 #CM_AFM_FILES = cmr10 diff --git a/mf/feta-beugel.mf b/mf/feta-beugel.mf index 94218544ca..419f3b59ed 100644 --- a/mf/feta-beugel.mf +++ b/mf/feta-beugel.mf @@ -11,6 +11,16 @@ save code; code := 0; +def abc_encode_int (expr i) = + if i > 0: + abc_encode_int(i div 26)&char(65 + i mod 26) + else: + "A" + fi +enddef ; + +message (abc_encode_int (26)); + def draw_brace (expr height_sharp, width_sharp, slt_sharp) = save pendir, height, width, thin, thick, slt; @@ -19,8 +29,10 @@ def draw_brace (expr height_sharp, width_sharp, slt_sharp) = width# := width_sharp; slt# := slt_sharp; - beginchar(code, width#, height#/2, height#/2); - code := incr code; +fet_beginchar("brace number "&(decimal code), "brace"&abc_encode_int(code), + "brace"&abc_encode_int (code)) + + set_char_box (0, width#, height#/2, height#/2); define_pixels (height, width, slt); thin = 2 slt; @@ -44,7 +56,7 @@ def draw_brace (expr height_sharp, width_sharp, slt_sharp) = .. z2l .. simple_serif (z1l, z1r, 90) ..cycle; addto currentpicture also currentpicture yscaled -1; -endchar; +fet_endchar; enddef; -- 2.39.2