+1.3.152.jcn3
+============
+
+* Fixed brace font selection: do pick bigger font when needed.
+
+* Increased number of brace fonts; made size step variable.
+
1.3.152.jcn2
============
README_FILES = DEDICATION COPYING NEWS CHANGES ROADMAP
README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt FAQ.txt
IN_FILES := $(wildcard *.in)
-EXTRA_DIST_FILES = lilypond-font-lock.el lilypond-mode.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) emacsclient.patch
+EXTRA_DIST_FILES = lilypond-font-lock.el lilypond-mode.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) emacsclient.patch mktexnam.patch
NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
INSTALLATION_DIR=$(datadir)
INSTALLATION_FILES=$(configuration) VERSION
MAJOR_VERSION=1
MINOR_VERSION=3
PATCH_LEVEL=152
-MY_PATCH_LEVEL=jcn2
+MY_PATCH_LEVEL=jcn3
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
;; what am I doing wrong?
;;
(define (do-file tfm-name output-name)
- (let* ((font (basename tfm-name '.tfm))
- (afm-name (string-append font '.afm))
- (dit-name (string-append font '.dit))
- (chart-name (string-append font '.chart))
+ (let* ((font (basename tfm-name ".tfm"))
+ (afm-name (string-append font ".afm"))
+ (dit-name (string-append font ".dit"))
+ (chart-name (string-append font ".chart"))
(chart (let loop ((i 0) (s ""))
(if (= i 256)
s
(dump-file chart-name chart)
(if (= 0 (primitive-fork))
- (execlp 'tfmtodit tfm-name tfm-name chart-name dit-name)
+ (execlp "tfmtodit" tfm-name tfm-name chart-name dit-name)
(waitpid 0))
(let* ((dit (gulp-file dit-name))
--- /dev/null
+\header {
+texidoc="Run this through ly2dvi to show differerent brace sizes"
+}
+
+\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
+ >
+}
System_start_delimiter::staff_brace (Grob*me, Real y)
{
Font_metric *fm = Font_interface::get_default_font (me);
+ SCM font_defaults = gh_cdr (scm_assoc (ly_symbol2scm ("font-defaults"),
+ me->paper_l ()->style_sheet_));
+
Box b;
+#if 0
+ b = fm->get_char (0);
+ int count = fm->count () >? 2;
+#else
+ int count = 255;
+#endif
int lo = 0;
- int hi = 255; //arg, urg == 0: fm->count () >? 2;
-
- int big = 1;
- SCM bigger = gh_list (me->mutable_property_alist_,
- me->immutable_property_alist_,
- SCM_UNDEFINED);
+ int hi = count;
+ int relative_size = 0;
/* do a binary search for each Y, not very efficient, but passable? */
do
{
int cmp = (lo + hi) / 2;
-
b = fm->get_char (cmp);
if (b[Y_AXIS].empty_b () || b[Y_AXIS].length () > y)
- {
- hi = cmp;
- }
+ hi = cmp;
else
+ lo = cmp;
+
+ if (lo == count - 1 && b[Y_AXIS].length () < y && relative_size < 10)
{
/*
ugh: 7
In the style-sheet, all paper relative sizes need to start
looking at the feta-braces0 font.
-
+
The smallest paper size, feta11 or -3, has to make 5 steps
- to get to feta26 or +2. Only after that, from +3 to +5 are
- the real bigger sizes, so worst case we need 8 steps to get
+ to get to feta26 or +2. Only after that, from +3 to +8 are
+ the real bigger sizes, so worst case we need 11 steps to get
to the font we need. */
- if (big < 8)
- {
- bigger = gh_cons (gh_cons (ly_symbol2scm ("font-relative-size"),
- gh_int2scm (big++)),
- bigger);
- me->set_grob_property ("font", bigger);
- fm = Font_interface::get_default_font (me);
- lo = 0;
- hi = 255; //fm->count () >? 2;
- }
- else
- lo = cmp;
+ fm = Font_interface::get_font
+ (me,
+ gh_list (gh_list (gh_cons (ly_symbol2scm ("font-relative-size"),
+ gh_int2scm (++relative_size)),
+ SCM_UNDEFINED),
+ me->mutable_property_alist_,
+ me->immutable_property_alist_,
+ font_defaults,
+ SCM_UNDEFINED));
+#if 0
+ b = fm->get_char (0);
+ count = fm->count () >? 2;
+#else
+ count = 255;
+#endif
+ lo = 0;
+ hi = count;
}
- }
+ }
while (hi - lo > 1);
+ // uRGURGU, why doesn't the height calculation work out??
+ SCM weird = me->get_grob_property ("weird");
+ if (gh_number_p (weird))
+ lo += gh_scm2int (weird);
SCM at = gh_list (ly_symbol2scm ("char"), gh_int2scm (lo), SCM_UNDEFINED);
at = fontify_atom (fm, at);
+input feta-autometric;
input feta-macros;
input feta-params;
+fet_beginfont("feta-braces", 16);
+mode_setup;
+
+staffsize#:=16pt#;
+
save code;
-code :=0;
+code := 0;
-def draw_brace( expr height_sharp, width_sharp) =
- save pendir, height, width, thin, thick;
+def draw_brace (expr height_sharp, width_sharp, slt_sharp) =
+ save pendir, height, width, thin, thick, slt;
save penangle;
height# := height_sharp;
- width# := width_sharp;
+ width# := width_sharp;
+ slt# := slt_sharp;
beginchar(code, width#, height#/2, height#/2);
code := incr code;
- define_pixels (height, width);
- thin = 2 stafflinethickness;
+ define_pixels (height, width, slt);
+ thin = 2 slt;
thick = .5 width;
z2 = .5 [z1, z3];
- y3 = y1 + height/2;
+ y3l = y1 + height/2;
x3 = x1 + width;
y1 =0;
x3 = - width / 2;
pair pendir;
- pendir = unitvector(x3 - x1, y3/6 - y1);
+ pendir = unitvector(x3 - x1, y3l/6 - y1);
penangle = angle pendir - 90;
penpos3(thin, penangle);
penpos2(thick, angle(z3 -z1) -90 );
endchar;
enddef;
-for i := font_count * 256 step 1 until (font_count + 1) * 256 - 1:
- % note: define_pixels (x) multiplies x by hppp,
- % we must never get bigger than infinity
- y := min ((i + 1) * 0.25pt#, infinity/hppp - 1);
- x := y / 12;
- draw_brace (y, x);
+l := 0.05pt#;
+y := 10pt#;
+
+for i := 0 step 1 until font_count:
+ for j := 0 step 1 until 255:
+ % message "l: "&decimal l;
+ % note: define_pixels (x) multiplies x by hppp,
+ % must never get bigger than infinity
+ y := min (y + l / 2, infinity/hppp - 1);
+ % x should be about one staff space, taking brace to have
+ % default height of 3 staffs, this yields height / 3 / 4
+ x := y / 12;
+ % l should be about one stafflinethickness
+ l := x / 10;
+ if i = font_count:
+ draw_brace (y, x, l);
+ fi
+ endfor;
endfor
+
+fet_endfont("feta-braces");
% (c) 1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
%
-font_identifier:="feta-braces0";
-font_size 16;
-mode_setup;
-
-staffsize#:=16pt#;
font_count := 0;
input feta-beugel;
end.
-
% (c) 1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
%
-font_identifier:="feta-braces1";
-font_size 16;
-mode_setup;
-
-staffsize#:=16pt#;
font_count := 1;
input feta-beugel;
end.
-
% (c) 1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
%
-font_identifier:="feta-braces2";
-font_size 16;
-mode_setup;
-
-staffsize#:=16pt#;
font_count := 2;
input feta-beugel;
end.
-
% (c) 1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
%
-font_identifier:="feta-braces3";
-font_size 16;
-mode_setup;
-
-staffsize#:=16pt#;
font_count := 3;
input feta-beugel;
end.
-
--- /dev/null
+%
+% feta-braces4.mf -- next 256 braces
+%
+% source file of the Feta (Font-En-Tja) music font
+%
+% (c) 1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+%
+
+font_count := 4;
+input feta-beugel;
+end.
+
+
--- /dev/null
+%
+% feta-braces5.mf -- next 256 braces
+%
+% source file of the Feta (Font-En-Tja) music font
+%
+% (c) 1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+%
+
+font_count := 5;
+input feta-beugel;
+end.
--- /dev/null
+%
+% feta-braces6.mf -- next 256 braces
+%
+% source file of the Feta (Font-En-Tja) music font
+%
+% (c) 1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+%
+
+font_count := 6;
+input feta-beugel;
+end.
--- /dev/null
+--- mktexnam.orig Sun Mar 4 19:29:45 2001
++++ mktexnam Tue May 8 20:28:57 2001
+@@ -158,6 +158,7 @@
+ MT_PKDESTDIR=$DEST
+ MT_TFMDESTDIR=$DEST
+ MT_MFDESTDIR=$DEST
++ MT_DESTROOT=foobar
+ MT_NAMEPART=;;
+ *) # Relative destdir => append to the default.
+ MT_NAMEPART=$DEST;;
((-2 medium caps roman cmcsc 7) . "cmcsc7")
((-3 medium caps roman cmcsc 7) . "cmcsc7")
- ;; smallest needs 8 steps: -3 to +5, so
- ;; biggest also needs 8 available steps: +2 to + 10
- ((10 * * braces feta-braces 3) . "feta-braces3")
- ((9 * * braces feta-braces 3) . "feta-braces3")
- ((8 * * braces feta-braces 3) . "feta-braces3")
- ((7 * * braces feta-braces 3) . "feta-braces3")
- ((6 * * braces feta-braces 3) . "feta-braces3")
+ ;; smallest needs 11 steps: -3 to +8, so
+ ;; biggest also needs 11 available steps: +2 to + 13
+ ((13 * * braces feta-braces 6) . "feta-braces6")
+ ((12 * * braces feta-braces 6) . "feta-braces6")
+ ((11 * * braces feta-braces 6) . "feta-braces6")
+ ((10 * * braces feta-braces 6) . "feta-braces6")
+ ((9 * * braces feta-braces 6) . "feta-braces6")
+ ((8 * * braces feta-braces 6) . "feta-braces6")
+ ((7 * * braces feta-braces 5) . "feta-braces5")
+ ((6 * * braces feta-braces 4) . "feta-braces4")
((5 * * braces feta-braces 3) . "feta-braces3")
((4 * * braces feta-braces 2) . "feta-braces2")
((3 * * braces feta-braces 1) . "feta-braces1")
;; TODO: should split in 3
(SystemStartDelimiter . (
+ ;; (weird . 0)
(molecule-callback . ,System_start_delimiter::brew_molecule)
(after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
;; really 4.0, but 5 to be on safe side.
function of type (beam multiplicity dy staff-line-thickness) -> real. Default value: default-beam-y-quants, also available: beam-traditional-y-quants.
.")
(grob-property-description 'visibility-lambda procedure? "a function that takes the break direction and returns a cons of booleans containing (TRANSPARENT . EMPTY).")
+(grob-property-description 'weird number? "urg?")
(grob-property-description 'when moment? "when does this column happen?.")
(grob-property-description 'word-space number? "elongate left by this much (FIXME: cumbersome semantics).")
(grob-property-description 'x-gap number? "horizontal gap between notehead and tie.")