When we have lots of flag sizes, there will be lots of glyphs.
With a maximum of 256-32 = 234 glyphs per sub font, we wanted to
have flags in their own sub font.
But flags depend on notehead widths, so they needed to be in the
same subfont as the noteheads.
This patch moves the notehead parameters from feta-noteheads.mf to
feta-params.mf, so the basic notehead parameters are available to
all subfonts.
Also, AFAICS, bigcheese.pe.in is no longer used -- it doesn't show
up anywhere in a git grep, except as having been renamed. It doesn't
show up in GNUmakefile. So I deleted it.
$(call src-wildcard,feta-braces-[a-z].mf) \
$(call src-wildcard,feta-alphabet*[0-9].mf) \
$(call src-wildcard,feta-notehead*[0-9].mf) \
+ $(call src-wildcard,feta-flags*[0-9].mf) \
$(call src-wildcard,parmesan[0-9]*.mf)
STAFF_SIZES = 11 13 14 16 18 20 23 26
$(outdir)/emmentaler-%.woff: $(outdir)/emmentaler-%.pe \
$(outdir)/feta%.pfb \
$(outdir)/feta-noteheads%.pfb \
+ $(outdir)/feta-flags%.pfb \
$(outdir)/feta-alphabet%.pfb \
$(outdir)/parmesan%.pfb \
$(outdir)/feta%.otf-table \
$(outdir)/%.otf-table: $(outdir)/%.lisp
cat $< $(if $(findstring brace,$<),,$(subst feta,parmesan,$<)) \
$(if $(findstring brace,$<),,$(subst feta,feta-noteheads,$<)) \
+ $(if $(findstring brace,$<),,$(subst feta,feta-flags,$<)) \
$(if $(findstring brace,$<),,$(subst feta,feta-alphabet,$<)) > $@
## ugh -- we want this to prevent failing -j2 compiles.
$(outdir)/feta26.otf-table: $(outdir)/feta26.lisp \
$(outdir)/feta-noteheads26.lisp \
+ $(outdir)/feta-flags26.lisp \
$(outdir)/parmesan26.lisp \
$(outdir)/feta-alphabet26.lisp
$(outdir)/feta23.otf-table: $(outdir)/feta23.lisp \
$(outdir)/feta-noteheads23.lisp \
+ $(outdir)/feta-flags23.lisp \
$(outdir)/parmesan23.lisp \
$(outdir)/feta-alphabet23.lisp
$(outdir)/feta20.otf-table: $(outdir)/feta20.lisp \
$(outdir)/feta-noteheads20.lisp \
+ $(outdir)/feta-flags20.lisp \
$(outdir)/parmesan20.lisp \
$(outdir)/feta-alphabet20.lisp
$(outdir)/feta18.otf-table: $(outdir)/feta18.lisp \
$(outdir)/feta-noteheads18.lisp \
+ $(outdir)/feta-flags18.lisp \
$(outdir)/parmesan18.lisp \
$(outdir)/feta-alphabet18.lisp
$(outdir)/feta16.otf-table: $(outdir)/feta16.lisp \
$(outdir)/feta-noteheads16.lisp \
+ $(outdir)/feta-flags16.lisp \
$(outdir)/parmesan16.lisp \
$(outdir)/feta-alphabet16.lisp
$(outdir)/feta14.otf-table: $(outdir)/feta14.lisp \
$(outdir)/feta-noteheads14.lisp \
+ $(outdir)/feta-flags14.lisp \
$(outdir)/parmesan14.lisp \
$(outdir)/feta-alphabet14.lisp
$(outdir)/feta13.otf-table: $(outdir)/feta13.lisp \
$(outdir)/feta-noteheads13.lisp \
+ $(outdir)/feta-flags13.lisp \
$(outdir)/parmesan13.lisp \
$(outdir)/feta-alphabet13.lisp
$(outdir)/feta11.otf-table: $(outdir)/feta11.lisp \
$(outdir)/feta-noteheads11.lisp \
+ $(outdir)/feta-flags11.lisp \
$(outdir)/parmesan11.lisp \
$(outdir)/feta-alphabet11.lisp
+++ /dev/null
-#!@FONTFORGE@
-
-
-
-New();
-
-# Separate Feta versioning?
-# Naming: * expose LilyPond20/LilyPond rather than bigcheese
-# * using 20 as Weight works for gnome-font-select widget: gfs
-SetFontNames("bigcheese20", "LilyPond", "LilyPond BigCheese 20", "20", "GNU GPL", "@TOPLEVEL_VERSION@");
-
-MergeFonts("feta20.pfa");
-MergeFonts("feta-noteheads20.pfa");
-MergeFonts("parmesan20.pfa");
-
-# load nummer/din after setting PUA.
-i = 0;
-while (i < CharCnt())
- Select(i);
-# crashes fontforge, use PUA for now -- jcn
-# SetUnicodeValue(i + 0xF0000, 0);
-/*
-PRIVATE AREA
- In the BMP, the range 0xe000 to 0xf8ff will never be assigned to any
- characters by the standard and is reserved for private usage. For the
- Linux community, this private area has been subdivided further into the
- range 0xe000 to 0xefff which can be used individually by any end-user
- and the Linux zone in the range 0xf000 to 0xf8ff where extensions are
- coordinated among all Linux users. The registry of the characters
- assigned to the Linux zone is currently maintained by H. Peter Anvin
- <Peter.Anvin@linux.org>.
-*/
- SetUnicodeValue(i + 0xE000, 0);
- ++i;
-endloop
-
-
-MergeFonts("feta-nummer10.pfa");
-MergeFonts("feta-din14.pfa");
-MergeKern("feta-din14.tfm");
-
-LoadTableFromFile("LILC", "feta20.otf-table")
-
-Generate("bigcheese20.otf");
-Generate("bigcheese20.cff");
--- /dev/null
+% Feta (not the Font-En-Tja) music font -- generic stuff: include lots of files, but don't
+% This file is part of LilyPond, the GNU music typesetter.
+%
+% Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+%
+%
+% LilyPond is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% LilyPond is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+
+
+if test = -1:
+ mode := smoke;
+fi
+
+staffsize# := design_size * pt#;
+
+mode_setup;
+
+input feta-macros;
+
+input feta-params;
+
+font_x_height staff_space#;
+
+fet_beginfont ("feta", design_size, "fetaMusic");
+
+input feta-flags;
+
+autometric_parameter ("staffsize", staffsize#);
+autometric_parameter ("stafflinethickness", stafflinethickness#);
+autometric_parameter ("staff_space", staff_space#);
+autometric_parameter ("linethickness", linethickness#);
+autometric_parameter ("black_notehead_width", black_notehead_width#);
+autometric_parameter ("ledgerlinethickness", ledgerlinethickness#);
+autometric_parameter ("blot_diameter", blot_diameter#);
+
+fet_endfont;
--- /dev/null
+% feta-flags11.mf
+% part of LilyPond's pretty-but-neat music font
+
+input feta-autometric;
+
+design_size := 11.22;
+test := 0;
+
+
+input feta-flags-generic;
+
+end.
+
--- /dev/null
+% feta-flags13.mf
+% part of LilyPond's pretty-but-neat music font
+
+input feta-autometric;
+
+design_size := 12.60;
+test := 0;
+
+
+input feta-flags-generic;
+
+end.
+
--- /dev/null
+% feta-flags14.mf
+% part of LilyPond's pretty-but-neat music font
+
+input feta-autometric;
+
+design_size := 14.14;
+test := 0;
+
+
+input feta-flags-generic;
+
+end.
+
--- /dev/null
+% feta-flags16.mf
+% part of LilyPond's pretty-but-neat music font
+
+input feta-autometric;
+
+design_size := 15.87;
+test := 0;
+
+
+input feta-flags-generic;
+
+end.
+
--- /dev/null
+% feta-flags18.mf
+% part of LilyPond's pretty-but-neat music font
+
+input feta-autometric;
+
+design_size := 17.82;
+test := 0;
+
+
+input feta-flags-generic;
+
+end.
+
--- /dev/null
+% feta-flags20.mf
+% part of LilyPond's pretty-but-neat music font
+
+input feta-autometric;
+
+design_size := 20;
+test := 0;
+
+
+input feta-flags-generic;
+
+end.
+
--- /dev/null
+% feta-flags23.mf
+% part of LilyPond's pretty-but-neat music font
+
+input feta-autometric;
+
+design_size := 22.45;
+test := 0;
+
+
+input feta-flags-generic;
+
+end.
+
--- /dev/null
+% feta-flags26.mf
+% part of LilyPond's pretty-but-neat music font
+
+input feta-autometric;
+
+design_size := 25.20;
+test := 0;
+
+
+input feta-flags-generic;
+
+end.
+
font_x_height staff_space#;
-%% this is a fallback so we can run the font without including feta-noteheads.
-black_notehead_width# := 1.0 staff_space#;
-
-
fet_beginfont ("feta", design_size, "fetaMusic");
if test = 0:
font_x_height staff_space#;
-%% this is a fallback so we can run the font without
-%% including feta-noteheads.
-black_notehead_width# := 1.0 staff_space#;
-
-
fet_beginfont ("feta", design_size, "fetaMusic");
-if test = 0:
- input feta-noteheads;
- input feta-flags;
-else:
- input feta-noteheads-test-generic.mf;
-fi
+input feta-noteheads;
autometric_parameter ("staffsize", staffsize#);
autometric_parameter ("stafflinethickness", stafflinethickness#);
+++ /dev/null
-%
-% test stuff.
-% in a separate file to avoid tainting non-test font files for testing.
-%
-
-input feta-noteheads;
-%input feta-flags;
% NOTE HEAD VARIABLES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-save black_notehead_width, noteheight;
-save half_notehead_width, whole_notehead_width, slash_thick;
-save slash_slope, overdone_heads, solfa_noteheight;
+save half_notehead_width, whole_notehead_width;
+save solfa_noteheight;
-numeric noteheight;
-numeric slash_thick;
-numeric black_notehead_width;
numeric whole_notehead_width;
numeric half_notehead_width;
-
fet_begingroup ("noteheads");
-% Slope of slash. From scm/grob-description.scm. How to auto-copy?
-slash_slope := 1.7;
-
-% Thickness of slash lines. Quarter notes get 1.5slt width.
-slash_thick# := 2/3 * 0.48 staff_space#;
-
-
-%
-% Hand-engraved music often has balls extending above and below
-% the lines. If you like that, modify overdone heads (unit:
-% stafflinethickness).
-%
-overdone_heads = 0.0;
-noteheight# := staff_space# + (1 + overdone_heads) * stafflinethickness#;
-
-
%
% solfa heads should not overlap on chords.
%
solfa_noteheight# := staff_space# - stafflinethickness#;
-define_pixels (slash_thick);
-define_whole_vertical_pixels (noteheight);
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% SLANT moves both extrema on the long axis (by SLANT * ELLIPTICITY,
-% so SLANT = -1, puts the extreme on the long axis next to the short
-% axis one).
-%
-
-def draw_outside_ellipse (expr ellipticity, tilt, superness, slant) =
- save attachment_y;
- save pat;
- path pat;
-
- pat := superellipse ((ellipticity, 0), (-slant * ellipticity, 1.0),
- (-ellipticity, 0), (slant * ellipticity, -1.0),
- superness);
- pat := pat rotated tilt;
-
- save top_point, right_point;
- pair top_point, right_point;
-
- top_point := directionpoint left of pat;
- right_point := directionpoint up of pat;
-
- save scaling, width;
-
- scaling# = noteheight# / (2 ypart (top_point));
- width# := 2 xpart (right_point) * scaling#;
- define_pixels (scaling, width);
-
- set_char_box (0, width#, noteheight# / 2, noteheight# / 2);
-
- d := d - feta_space_shift;
-
- % attachment Y
- charwy := ypart (right_point) * scaling#;
- charwx := width#;
-
- pat := pat scaled scaling shifted (w / 2, .5 (h - d));
-
- width := hround width;
-
- if test_outlines = 1:
- draw pat;
- else:
- fill pat;
- fi;
-enddef;
-
-
def undraw_inside_ellipse (expr ellipticity, tilt, superness, clearance) =
begingroup
save pat;
fet_beginchar ("Quarter notehead", "s2");
- % used to have 32. With 31, they are slightly bolder.
- draw_outside_ellipse (1.49 - puff_up_factor / 3.0, 31, 0.707, 0);
- black_notehead_width# := charwd;
-
+ draw_quarter_path;
draw_staff (-2, 2, 0);
fet_endchar;
fi;
feta_fillpen := savepen;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Notehead width and height are defined here.
+%
+%
+% Slope of slash. From scm/grob-description.scm. How to auto-copy?
+slash_slope := 1.7;
+
+% Thickness of slash lines. Quarter notes get 1.5slt width.
+slash_thick# := 2/3 * 0.48 staff_space#;
+
+%
+% Hand-engraved music often has balls extending above and below
+% the lines. If you like that, modify overdone heads (unit:
+% stafflinethickness).
+%
+overdone_heads = 0.0;
+noteheight# := staff_space# + (1 + overdone_heads) * stafflinethickness#;
+
+define_pixels (slash_thick);
+define_whole_vertical_pixels (noteheight);
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% This is used to draw all elliptical notes; it also sets
+% black_notehead_width, so it should be called in any file that
+% needs the value of black_notehead_width.
+%
+% SLANT moves both extrema on the long axis (by SLANT * ELLIPTICITY,
+% so SLANT = -1, puts the extreme on the long axis next to the short
+% axis one).
+%
+
+def draw_outside_ellipse (expr ellipticity, tilt, superness, slant) =
+ save attachment_y;
+ save pat;
+ path pat;
+
+ pat := superellipse ((ellipticity, 0), (-slant * ellipticity, 1.0),
+ (-ellipticity, 0), (slant * ellipticity, -1.0),
+ superness);
+ pat := pat rotated tilt;
+
+ save top_point, right_point;
+ pair top_point, right_point;
+
+ top_point := directionpoint left of pat;
+ right_point := directionpoint up of pat;
+
+ save scaling, width;
+
+ scaling# := noteheight# / (2 ypart (top_point));
+ width# := 2 xpart (right_point) * scaling#;
+ define_pixels (scaling, width);
+ set_char_box (0, width#, noteheight# / 2, noteheight# / 2);
+
+ d := d - feta_space_shift;
+
+ % attachment Y
+ charwy := ypart (right_point) * scaling#;
+ charwx := width#;
+
+ pat := pat scaled scaling shifted (w / 2, .5 (h - d));
+
+ width := hround width;
+
+ if test_outlines = 1:
+ draw pat;
+ else:
+ fill pat;
+ fi;
+enddef;
+
+
+def draw_quarter_path =
+ draw_outside_ellipse (1.49 - puff_up_factor / 3.0, 31, 0.707, 0);
+enddef;
+
+test_outlines := 0;
+draw_quarter_path;
+black_notehead_width# := charwd;
+
+define_pixels (slash_thick);
+define_whole_vertical_pixels (noteheight);
+
+
fet_beginchar ("Arpeggio", "arpeggio");
+ begingroup;
save height, overshoot, width;
- height# = staff_space#;
- width# = 0.8 height#;
- overshoot# = 0.25 staff_space#;
+ height# := staff_space#;
+ width# := 0.8 * height#;
+ overshoot# := 0.25 * staff_space#;
define_pixels (height, overshoot, width);
-
set_char_box (0, width#, 0, height#);
draw_arpeggio;
penlabels (range 1 thru 9);
draw_staff (-2, 2, 0.0);
+ endgroup;
fet_endchar;
%
fet_beginchar ("Trill_element", "trill_element");
- save height, overshoot;
+ begingroup;
+ save height, overshoot, width;
height# = staff_space#;
width# = 0.8 height#;
overshoot# = 0.25 staff_space#;
currentpicture := currentpicture shifted -(width / 2, height / 2);
currentpicture := currentpicture rotated 90;
currentpicture := currentpicture shifted (height / 2, width / 2);
+ endgroup;
fet_endchar;
%
% TODO: should depth/height include appendages/stems?
+save overdone_heads, noteheight;
+
overdone_heads = 0;
noteheight# := staff_space# + (1 + overdone_heads) * stafflinethickness#;
define_pixels (noteheight);
MergeFonts("feta%(design_size)d.pfb");
MergeFonts("feta-noteheads%(design_size)d.pfb");
+MergeFonts("feta-flags%(design_size)d.pfb");
MergeFonts("parmesan%(design_size)d.pfb");
# load nummer/din after setting PUA.
enc_name = 'ParmesanEncoding'
elif re.search ('feta-noteheads', filenm):
enc_name = 'FetaNoteheadsEncoding'
+ elif re.search ('feta-flags', filenm):
+ enc_name = 'FetaFlagsEncoding'
elif re.search ('feta-brace', filenm):
enc_name = 'FetaBraceEncoding'
elif re.search ('feta-alphabet', filenm):