From: Han-Wen Nienhuys Date: Sun, 12 Dec 2004 21:27:26 +0000 (+0000) Subject: * lily/dots.cc (print): replace - X-Git-Tag: release/2.5.14~437 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a33165e3b6af2d807d069e6eacd0e220ba2ef68a;p=lilypond.git * lily/dots.cc (print): replace - * lily/open-type-font.cc (attachment_point): new function. (load_table): read LILC table * buildscripts/gen-bigcheese-scripts.py (Module): new file. Generate FF scripts. * mf/feta-din10.mf: idem. * mf/feta-nummer10.mf: remove mf files. * mf/feta-alphabet.mf (dynamic_design_size): merge din and number font. --- diff --git a/ChangeLog b/ChangeLog index 3026e59237..bb164bac12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2004-12-12 Han-Wen Nienhuys + + * lily/dots.cc (print): replace - + + * lily/open-type-font.cc (attachment_point): new function. + (load_table): read LILC table + + * buildscripts/gen-bigcheese-scripts.py (Module): new + file. Generate FF scripts. + + * mf/feta-din10.mf: idem. + + * mf/feta-nummer10.mf: remove mf files. + + * mf/feta-alphabet.mf (dynamic_design_size): merge din and number font. + 2004-12-12 Jan Nieuwenhuizen * lily/lily-guile.cc: Use scm_from_locale_stringn. diff --git a/buildscripts/gen-bigcheese-scripts.py b/buildscripts/gen-bigcheese-scripts.py new file mode 100644 index 0000000000..3cf300f26b --- /dev/null +++ b/buildscripts/gen-bigcheese-scripts.py @@ -0,0 +1,76 @@ +#!@PYTHON@ +import sys +import getopt +import re +import os + +(options, files) = \ + getopt.getopt (sys.argv[1:], + '', + ['dir=']) + + +outdir = '' +for opt in options: + o = opt[0] + a = opt[1] + if o == '--dir': + outdir = a + else: + print o + raise getopt.error + + +for design_size in [11,13,14,16,18,20,23,26]: + name = 'bigcheese' + script = '''#!@FONTFORGE@ +New(); + +# Separate Feta versioning? +# Naming: * expose LilyPond20/LilyPond rather than %(name)s +# * using 20 as Weight works for gnome-font-select widget: gfs +SetFontNames("%(name)s%(design_size)d", "LilyPond", "LilyPond %(name)s %(design_size)d", "%(design_size)d", "GNU GPL", "@TOPLEVEL_VERSION@"); + +MergeFonts("feta%(design_size)d.pfa"); +MergeFonts("parmesan%(design_size)d.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 + . +*/ + SetUnicodeValue(i + 0xE000, 0); + ++i; +endloop + + +MergeFonts("feta-alphabet%(design_size)d.pfa"); +MergeKern("feta-alphabet%(design_size)d.tfm"); + +LoadTableFromFile("LILC", "feta%(design_size)d.otf-table") + +Generate("%(name)s%(design_size)d.otf"); +Generate("%(name)s%(design_size)d.cff");''' % vars() + + path = os.path.join (outdir, name + '%d' % design_size + '.pe') + open (path, 'w').write (script) + + path = os.path.join (outdir, name + '%d' % design_size + '.dep') + + deps = r'''%(name)s%(design_size)d.otf: $(outdir)/feta%(design_size)d.pfa \ + $(outdir)/parmesan%(design_size)d.pfa \ + $(outdir)/feta-alphabet%(design_size)d.pfa +''' % vars() + open (path, 'w').write (deps) diff --git a/buildscripts/mf-to-table.py b/buildscripts/mf-to-table.py index 22afb3e9ea..63632ff899 100644 --- a/buildscripts/mf-to-table.py +++ b/buildscripts/mf-to-table.py @@ -163,9 +163,9 @@ def write_otf_lisp_table (file, global_info, charmetrics): def conv_char_metric (charmetric): f = 1.0 - s = """((%s . -(bbox . (%f %f %f %f)) -(attachment . (%f %f)))) + s = """(%s . +((bbox . (%f %f %f %f)) + (attachment . (%f . %f)))) """ %(charmetric['name'], -charmetric['breapth'] * f, -charmetric['depth'] * f, diff --git a/lily/dots.cc b/lily/dots.cc index 1cd07bb3ca..0fd24ae0a9 100644 --- a/lily/dots.cc +++ b/lily/dots.cc @@ -26,7 +26,7 @@ Dots::print (SCM d) if (scm_is_number (c)) { - Stencil d = Font_interface::get_default_font (sc)->find_by_name (String ("dots-dot")); + Stencil d = Font_interface::get_default_font (sc)->find_by_name (String ("dots.dot")); Real dw = d.extent (X_AXIS).length (); diff --git a/lily/font-metric.cc b/lily/font-metric.cc index 0bfbca0ade..12c2d60398 100644 --- a/lily/font-metric.cc +++ b/lily/font-metric.cc @@ -288,3 +288,9 @@ get_encoded_index (Font_metric *m, String input_coding, int code) scm_int2num (code)); return scm_to_int (s); } + +Offset +Font_metric::attachment_point (String str) const +{ + return Offset (0, 0); +} diff --git a/lily/include/font-metric.hh b/lily/include/font-metric.hh index 7184c752aa..f9fe247f3d 100644 --- a/lily/include/font-metric.hh +++ b/lily/include/font-metric.hh @@ -21,6 +21,7 @@ public: String file_name_; virtual int count () const; + virtual Offset attachment_point (String) const; virtual Offset get_indexed_wxwy (int) const; virtual Box get_indexed_char (int index) const; virtual Box get_ascii_char (int ascii) const; diff --git a/lily/include/open-type-font.hh b/lily/include/open-type-font.hh index e50166ad73..c6e4e0c740 100644 --- a/lily/include/open-type-font.hh +++ b/lily/include/open-type-font.hh @@ -15,13 +15,16 @@ class Open_type_font : public Font_metric { - FT_Face face_; /* handle to face object */ + FT_Face face_; /* handle to face object */ + SCM lily_character_table_; + Open_type_font(); public: static SCM make_otf (String); virtual ~Open_type_font(); + virtual Offset attachment_point (String) const; virtual Box get_indexed_char (int) const; virtual int name_to_index (String) const; - + virtual void derived_mark () const; #if 0 virtual int count () const; virtual int index_to_ascii (int) const; diff --git a/lily/open-type-font.cc b/lily/open-type-font.cc index ab666a43fa..5d5f3501bc 100644 --- a/lily/open-type-font.cc +++ b/lily/open-type-font.cc @@ -9,10 +9,38 @@ #include +#include + #include "warn.hh" #include "open-type-font.hh" #include "dimensions.hh" +FT_Byte * +load_table (char const *tag_str, FT_Face face) +{ + FT_ULong length = 0; + FT_ULong tag = FT_MAKE_TAG(tag_str[0], tag_str[1], tag_str[2], tag_str[3]); + + int error_code = FT_Load_Sfnt_Table (face, tag, 0, NULL, &length); + if (!error_code) + { + FT_Byte*buffer = (FT_Byte*) malloc (length); + if (buffer == NULL) + error ("Not enough memory"); + + error_code = FT_Load_Sfnt_Table (face, tag, 0, buffer, &length ); + if (error_code) + { + error (_f ("Could not load %s font table", tag_str)); + } + + return buffer; + } + + return 0 ; +} + + SCM Open_type_font::make_otf (String str) { @@ -29,9 +57,50 @@ Open_type_font::make_otf (String str) error ("Unknown error reading font file."); } + + FT_Byte* buffer =load_table ("LILC", otf->face_); + if (buffer) + { + String contents ((char const*)buffer); + contents = "(quote " + contents + ")"; + + SCM alist = scm_c_eval_string (contents.to_str0()); + otf->lily_character_table_ = alist_to_hashq (alist); + free (buffer); + } + return otf->self_scm (); } +Open_type_font::Open_type_font() +{ + lily_character_table_ = SCM_EOL; +} + +void +Open_type_font::derived_mark () const +{ + scm_gc_mark (lily_character_table_); +} + +Offset +Open_type_font::attachment_point (String glyph_name) const +{ + SCM sym = ly_symbol2scm (glyph_name.to_str0 ()); + SCM entry = scm_hashq_ref (lily_character_table_, sym, SCM_BOOL_F); + + Offset o; + if (entry == SCM_BOOL_F) + return o; + + SCM char_alist = entry; + + SCM att_scm =scm_cdr (scm_assq (char_alist, ly_symbol2scm ("attachment"))); + + return ly_scm2offset (att_scm); +} + + Open_type_font::~Open_type_font() { FT_Done_Face (face_); diff --git a/mf/GNUmakefile b/mf/GNUmakefile index 831e68cbf6..2ad3b6b4be 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -11,13 +11,18 @@ EXTRA_DIST_FILES += README feta.tex # We don't use $(MF_FILES), because there's more .mf cruft here FETA_MF_FILES = $(wildcard feta[0-9]*.mf)\ $(wildcard feta-braces-[a-z].mf)\ - $(wildcard feta-din*[0-9].mf)\ - $(wildcard feta-nummer*[0-9].mf)\ + $(wildcard feta-alphabet*[0-9].mf)\ $(wildcard parmesan[0-9]*.mf) +STAFF_SIZES=11 13 14 16 18 20 23 26 + +CHEESES=$(addsuffix .otf,$(addprefix $(outdir)/bigcheese,$(STAFF_SIZES))) +PE_SCRIPTS=$(addsuffix .pe, $(addprefix $(outdir)/bigcheese,$(STAFF_SIZES))) \ + $(addsuffix .dep, $(addprefix $(outdir)/bigcheese,$(STAFF_SIZES))) +OTF_TABLES=$(addsuffix .otf-table, $(addprefix $(outdir)/feta,$(STAFF_SIZES))) FETA_FONTS = $(FETA_MF_FILES:.mf=) -XPM_FONTS = feta20 feta-din10 feta-nummer10 feta-braces20 parmesan20 + LOG_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.log) TEXTABLES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tex) @@ -46,9 +51,22 @@ foe: $(outdir)/feta20.otf-table: cat $(outdir)/feta20.lisp $(outdir)/parmesan20.lisp > $@ -$(outdir)/bigcheese20.otf: $(outdir)/bigcheese.pe $(outdir)/feta20.otf-table - (cd $(outdir) && fontforge -script bigcheese.pe) +$(outdir)/%.otf: $(outdir)/%.pe + (cd $(outdir) && fontforge -script $(notdir $<)) + +$(outdir)/%.otf-table: $(outdir)/%.lisp + cat $< $(subst parmesan,feta,$<) > $@ + + + +$(PE_SCRIPTS): + $(PYTHON) $(buildscript-dir)/gen-bigcheese-scripts.py --dir=$(outdir) + +include $(outdir)/bigcheese20.dep + +foo: + echo $(CHEESES) ## use separate package sauter-fonts-mftraced. SAUTER_FONTS = @@ -67,7 +85,7 @@ PFB_FILES = $(PFA_FILES:%.pfa=%.pfb) # Make tfm files first, log files last, # so that normally log files aren't made twice -ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(AFM_FILES) $(TFM_FILES) $(LOG_FILES) $(ENC_FILES) $(FETA_LIST_FILES) $(PFA_FILES) $(outdir)/lilypond.map $(outdir)/fonts.scale $(outdir)/Fontmap.lily +ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(AFM_FILES) $(TFM_FILES) $(LOG_FILES) $(ENC_FILES) $(FETA_LIST_FILES) $(OTF_TABLES) $(PFA_FILES) $(outdir)/lilypond.map $(outdir)/fonts.scale $(outdir)/Fontmap.lily $(CHEESES) #PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)" INSTALLATION_DIR=$(local_lilypond_datadir)/fonts/source diff --git a/mf/bigcheese.pe.in b/mf/bigcheese.pe.in index e6235a1882..46b74f0abf 100644 --- a/mf/bigcheese.pe.in +++ b/mf/bigcheese.pe.in @@ -1,5 +1,7 @@ #!@FONTFORGE@ + + New(); # Separate Feta versioning? diff --git a/mf/feta-alphabet.mf b/mf/feta-alphabet.mf new file mode 100644 index 0000000000..a4b672ab90 --- /dev/null +++ b/mf/feta-alphabet.mf @@ -0,0 +1,20 @@ + + +test:=0; + +input feta-autometric; +input feta-macros; + +fet_beginfont("feta-alphabet", staffheight, "fetaNumber"); + +mode_setup; + +number_design_size := staffheight/2; +dynamic_design_size := 14 staffheight / 20; + + +input feta-nummer-code; +input feta-din-code; + +fet_endfont("feta-nummer"); + diff --git a/mf/feta-alphabet11.mf b/mf/feta-alphabet11.mf new file mode 100644 index 0000000000..3e1ae1404a --- /dev/null +++ b/mf/feta-alphabet11.mf @@ -0,0 +1,6 @@ +% part of LilyPond's pretty-but-neat music font + +staffheight := 11.22; +input feta-alphabet; +end. + diff --git a/mf/feta-alphabet13.mf b/mf/feta-alphabet13.mf new file mode 100644 index 0000000000..93d286a378 --- /dev/null +++ b/mf/feta-alphabet13.mf @@ -0,0 +1,6 @@ +% part of LilyPond's pretty-but-neat music font + +staffheight := 12.60; +input feta-alphabet; +end. + diff --git a/mf/feta-alphabet14.mf b/mf/feta-alphabet14.mf new file mode 100644 index 0000000000..58cbf2b3b6 --- /dev/null +++ b/mf/feta-alphabet14.mf @@ -0,0 +1,6 @@ +% part of LilyPond's pretty-but-neat music font + +staffheight := 14.14; +input feta-alphabet; +end. + diff --git a/mf/feta-alphabet16.mf b/mf/feta-alphabet16.mf new file mode 100644 index 0000000000..b5f7691adc --- /dev/null +++ b/mf/feta-alphabet16.mf @@ -0,0 +1,6 @@ +% part of LilyPond's pretty-but-neat music font + +staffheight := 15.87; +input feta-alphabet; +end. + diff --git a/mf/feta-alphabet18.mf b/mf/feta-alphabet18.mf new file mode 100644 index 0000000000..488b381bd7 --- /dev/null +++ b/mf/feta-alphabet18.mf @@ -0,0 +1,6 @@ +% part of LilyPond's pretty-but-neat music font + +staffheight := 17.82; +input feta-alphabet; +end. + diff --git a/mf/feta-alphabet20.mf b/mf/feta-alphabet20.mf new file mode 100644 index 0000000000..708f91ca0e --- /dev/null +++ b/mf/feta-alphabet20.mf @@ -0,0 +1,7 @@ +% feta-alphabet20.mf +% part of LilyPond's pretty-but-neat music font + +staffheight := 20; +input feta-alphabet; +end. + diff --git a/mf/feta-alphabet23.mf b/mf/feta-alphabet23.mf new file mode 100644 index 0000000000..c0b678bf14 --- /dev/null +++ b/mf/feta-alphabet23.mf @@ -0,0 +1,7 @@ +% feta-alphabet20.mf +% part of LilyPond's pretty-but-neat music font + +staffheight := 22.45; +input feta-alphabet; +end. + diff --git a/mf/feta-alphabet26.mf b/mf/feta-alphabet26.mf new file mode 100644 index 0000000000..488b381bd7 --- /dev/null +++ b/mf/feta-alphabet26.mf @@ -0,0 +1,6 @@ +% part of LilyPond's pretty-but-neat music font + +staffheight := 17.82; +input feta-alphabet; +end. + diff --git a/mf/feta-din-code.mf b/mf/feta-din-code.mf index 4f097510a0..34203e3a07 100644 --- a/mf/feta-din-code.mf +++ b/mf/feta-din-code.mf @@ -1,3 +1,23 @@ + +ex# := (dynamic_design_size / 2.4)* pt#; +descender# := 0.5 ex#; +ascender# := 0.72 ex#; +staffspace# := 1.75 / 2.0 * ex#; + + +%% !! synchronize with feta-params.mf +linethickness# := 0.3 pt# + 0.04 staffspace#; +stafflinethickness# := stafflinethickness#; + +horizontal_space# := .66 ex#; + +font_x_height ex#; +font_normal_space horizontal_space#; + +define_pixels (staffspace, linethickness, stafflinethickness, ex, descender, ascender); + + + %% % % TODO: blot diameter should be fixed, not scalable. diff --git a/mf/feta-din.mf b/mf/feta-din.mf index 5294f2df7d..329b4e4f08 100644 --- a/mf/feta-din.mf +++ b/mf/feta-din.mf @@ -8,24 +8,7 @@ input feta-macros; % input feta-params; mode_setup; -ex# := (design_size / 2.4)* pt#; -descender# := 0.5 ex#; -ascender# := 0.72 ex#; -staffspace# := 1.75 / 2.0 * ex#; - - -%% !! synchronize with feta-params.mf -linethickness# := 0.3 pt# + 0.04 staffspace#; -stafflinethickness# := stafflinethickness#; - -horizontal_space# := .66 ex#; - -font_x_height ex#; -font_normal_space horizontal_space#; - -define_pixels (staffspace, linethickness, stafflinethickness, ex, descender, ascender); - -fet_beginfont("feta-din", design_size, "TeX text"); +fet_beginfont("feta-din", dynamic_design_size, "TeX text"); input feta-din-code; diff --git a/mf/feta-din10.mf b/mf/feta-din10.mf deleted file mode 100644 index 55a476a584..0000000000 --- a/mf/feta-din10.mf +++ /dev/null @@ -1,9 +0,0 @@ -% feta-din10.mf -% part of LilyPond's pretty-but-neat music font - -design_size:=10; % feta20 = 20pt - -input feta-din; - -end. - diff --git a/mf/feta-din12.mf b/mf/feta-din12.mf deleted file mode 100644 index f444107455..0000000000 --- a/mf/feta-din12.mf +++ /dev/null @@ -1,9 +0,0 @@ -% feta-din12.mf -% part of LilyPond's pretty-but-neat music font - -design_size:=12; % feta16 = 16pt - -input feta-din; - -end. - diff --git a/mf/feta-din14.mf b/mf/feta-din14.mf deleted file mode 100644 index 178c19a613..0000000000 --- a/mf/feta-din14.mf +++ /dev/null @@ -1,9 +0,0 @@ -% feta-din14.mf -% part of LilyPond's pretty-but-neat music font - -design_size:=14; % feta20 = 20pt - -input feta-din; - -end. - diff --git a/mf/feta-din17.mf b/mf/feta-din17.mf deleted file mode 100644 index 516f9c1048..0000000000 --- a/mf/feta-din17.mf +++ /dev/null @@ -1,9 +0,0 @@ -% feta-din17.mf -% part of LilyPond's pretty-but-neat music font - -design_size:=17; % feta23 = 23pt - -input feta-din; - -end. - diff --git a/mf/feta-din6.mf b/mf/feta-din6.mf deleted file mode 100644 index efaf13d5d9..0000000000 --- a/mf/feta-din6.mf +++ /dev/null @@ -1,9 +0,0 @@ -% feta-din6.mf -% part of LilyPond's pretty-but-neat music font - -design_size:=5.5; % feta11 = 11pt - -input feta-din.mf; - -end. - diff --git a/mf/feta-din8.mf b/mf/feta-din8.mf deleted file mode 100644 index 32767f685b..0000000000 --- a/mf/feta-din8.mf +++ /dev/null @@ -1,7 +0,0 @@ -% feta-din8.mf -% part of LilyPond's pretty-but-neat music font - -design_size:=8; % feta16 = 16pt - -input feta-din.mf; - diff --git a/mf/feta-nummer-code.mf b/mf/feta-nummer-code.mf index 16d69e15b0..0d27d9173b 100644 --- a/mf/feta-nummer-code.mf +++ b/mf/feta-nummer-code.mf @@ -6,6 +6,42 @@ % % (c) 1997--2004 Jan Nieuwenhuizen + + +height#:= number_design_size; +space# := number_design_size/2; + +font_x_height height#; +font_normal_space space#; + + +% +% DOCME! +%ugh. b and h are reused. +% + +save b,h; 4h+b=1.15; 10h+b=1; +fatten:=number_design_size*h+b; + +save b,h; 4h+b=1.05; 10h+b=1; +widen:=number_design_size*h+b; + +tense=0.85; +thick#:=7/30height#*fatten; +thin#:=thick#/4*fatten + max(.1 (height# / 10 - 1), 0); + +%% sqrt(.8 * blot_diameter#* thin#) ; +hair#:= thin# * .8 ; + + +flare#:=9/8 thick# + .75 (height# / 10 - 1); + +save b,h; 4h+b=1/8; 10h+b=1/6; +kuulleke#:=thick#*number_design_size*h+b; +foot_top#:=thick#; +foot_width#:=9/4thick#; + + % % These numbers were taken from a part that that the EJE violas played % 1997 -- Probably Mendelssohn's ouverture Heimkehr aus der Fremde. diff --git a/mf/feta-nummer.mf b/mf/feta-nummer.mf index 07106b6c1d..f732fae83c 100644 --- a/mf/feta-nummer.mf +++ b/mf/feta-nummer.mf @@ -15,41 +15,9 @@ input feta-macros; %blot_diameter# = .4pt#; -fet_beginfont("feta-nummer", design_size, "fetaNumber"); +fet_beginfont("feta-nummer", numberdesignsize/2, "fetaNumber"); mode_setup; -height#:=designsize; -space# := design_size/2; - -font_x_height height#; -font_normal_space space#; - - -% -% DOCME! -%ugh. b and h are reused. -% - -save b,h; 4h+b=1.15; 10h+b=1; -fatten:=designsize*h+b; - -save b,h; 4h+b=1.05; 10h+b=1; -widen:=designsize*h+b; - -tense=0.85; -thick#:=7/30height#*fatten; -thin#:=thick#/4*fatten + max(.1 (height# / 10 - 1), 0); - -%% sqrt(.8 * blot_diameter#* thin#) ; -hair#:= thin# * .8 ; - - -flare#:=9/8 thick# + .75 (height# / 10 - 1); - -save b,h; 4h+b=1/8; 10h+b=1/6; -kuulleke#:=thick#*designsize*h+b; -foot_top#:=thick#; -foot_width#:=9/4thick#; input feta-nummer-code; diff --git a/mf/feta-nummer10.mf b/mf/feta-nummer10.mf deleted file mode 100644 index 2c6e8f5338..0000000000 --- a/mf/feta-nummer10.mf +++ /dev/null @@ -1,9 +0,0 @@ -% feta-nummer10.mf -% part of LilyPond's pretty-but-neat music font - -design_size:=10; % feta20 = 20pt -% mode := smoke; -input feta-nummer; - -end. - diff --git a/mf/feta-nummer12.mf b/mf/feta-nummer12.mf deleted file mode 100644 index c3e868d31e..0000000000 --- a/mf/feta-nummer12.mf +++ /dev/null @@ -1,2 +0,0 @@ -design_size := 12; -input feta-nummer; diff --git a/mf/feta-nummer16.mf b/mf/feta-nummer16.mf deleted file mode 100644 index 92423b0058..0000000000 --- a/mf/feta-nummer16.mf +++ /dev/null @@ -1,2 +0,0 @@ -design_size := 16; -input feta-nummer; diff --git a/mf/feta-nummer20.mf b/mf/feta-nummer20.mf deleted file mode 100644 index 8ddfd9e16a..0000000000 --- a/mf/feta-nummer20.mf +++ /dev/null @@ -1,2 +0,0 @@ -design_size := 20.74; -input feta-nummer; diff --git a/mf/feta-nummer23.mf b/mf/feta-nummer23.mf deleted file mode 100644 index d3241514f3..0000000000 --- a/mf/feta-nummer23.mf +++ /dev/null @@ -1,2 +0,0 @@ -design_size := 23; -input feta-nummer; diff --git a/mf/feta-nummer26.mf b/mf/feta-nummer26.mf deleted file mode 100644 index a9308dd0ba..0000000000 --- a/mf/feta-nummer26.mf +++ /dev/null @@ -1,2 +0,0 @@ -design_size := 26; -input feta-nummer; diff --git a/mf/feta-nummer4.mf b/mf/feta-nummer4.mf deleted file mode 100644 index ebe2cfcdec..0000000000 --- a/mf/feta-nummer4.mf +++ /dev/null @@ -1,9 +0,0 @@ -% feta-nummer4.mf -% part of LilyPond's pretty-but-neat music font - -design_size:=3.82; % 5.5/1.2/1.2 nummer6 = 5.5pt - -input feta-nummer.mf; - -end. - diff --git a/mf/feta-nummer6.mf b/mf/feta-nummer6.mf deleted file mode 100644 index 4038deb23d..0000000000 --- a/mf/feta-nummer6.mf +++ /dev/null @@ -1,9 +0,0 @@ -% feta-nummer6.mf -% part of LilyPond's pretty-but-neat music font - -design_size:=5.5; % feta11 = 11pt - -input feta-nummer.mf; - -end. - diff --git a/mf/feta-nummer8.mf b/mf/feta-nummer8.mf deleted file mode 100644 index a35b177f78..0000000000 --- a/mf/feta-nummer8.mf +++ /dev/null @@ -1,7 +0,0 @@ -% feta-nummer8.mf -% part of LilyPond's pretty-but-neat music font - -design_size:=8; % feta16 = 16pt - -input feta-nummer.mf; -end. diff --git a/mf/feta-schrift.mf b/mf/feta-schrift.mf index 02c8de5b06..2bcce9a719 100644 --- a/mf/feta-schrift.mf +++ b/mf/feta-schrift.mf @@ -1042,14 +1042,14 @@ def draw_arpeggio_arrow = filldraw z3 -- z12 {dir -130} .. {dir -110} z10 {dir 110} .. {dir 130} z11 -- cycle; enddef; -fet_beginchar("Arpeggio arrow down", "arpeggio-arrow--1", "arpeggioarrowdown"); +fet_beginchar("Arpeggio arrow down", "arpeggio.arrow.M1", "arpeggioarrowdown"); draw_arpeggio_arrow; fet_endchar; -fet_beginchar("Arpeggio arrow up", "arpeggio-arrow-1", "arpeggioarrowup"); +fet_beginchar("Arpeggio arrow up", "arpeggio.arrow.1", "arpeggioarrowup"); draw_arpeggio_arrow; - currentpicture := currentpicture scaled -1 shifted (0.8staff_space, staff_space); + currentpicture := currentpicture scaled -1 shifted (0.8 staff_space, staff_space); fet_endchar; diff --git a/mf/feta26.mf b/mf/feta26.mf index 7df8ac277c..8e141de3b8 100644 --- a/mf/feta26.mf +++ b/mf/feta26.mf @@ -1,4 +1,4 @@ -% feta16.mf +% feta26.mf % part of LilyPond's pretty-but-neat music font input feta-autometric; diff --git a/scm/font.scm b/scm/font.scm index dde5e6f817..7e1677764a 100644 --- a/scm/font.scm +++ b/scm/font.scm @@ -149,45 +149,38 @@ (list (cons 'font-encoding (car x))) (cons (* factor (cadr x)) (caddr x)))) - `((fetaNumber 10 - #(,(delay (ly:font-load "feta-nummer4")) - ,(delay (ly:font-load "feta-nummer6")) - ,(delay (ly:font-load "feta-nummer8")) - ,(delay (ly:font-load "feta-nummer10")) - ,(delay (ly:font-load "feta-nummer12")) - ,(delay (ly:font-load "feta-nummer16")))) - (fetaDynamic 14.0 #(,(delay (ly:font-load "feta-din6")) - ,(delay (ly:font-load "feta-din8")) - ,(delay (ly:font-load "feta-din10")) - ,(delay (ly:font-load "feta-din12")) - ,(delay (ly:font-load "feta-din14")) - ,(delay (ly:font-load "feta-din17")))) - + `( + (fetaNumber 14 + #( + ,(delay (ly:font-load "bigcheese11")) + ,(delay (ly:font-load "bigcheese13")) + ,(delay (ly:font-load "bigcheese14")) + ,(delay (ly:font-load "bigcheese16")) + ,(delay (ly:font-load "bigcheese18")) + ,(delay (ly:font-load "bigcheese20")) + ,(delay (ly:font-load "bigcheese23")) + ,(delay (ly:font-load "bigcheese26")))) + + (fetaDynamic 20.0 #( + ,(delay (ly:font-load "bigcheese11")) + ,(delay (ly:font-load "bigcheese13")) + ,(delay (ly:font-load "bigcheese14")) + ,(delay (ly:font-load "bigcheese16")) + ,(delay (ly:font-load "bigcheese18")) + ,(delay (ly:font-load "bigcheese20")) + ,(delay (ly:font-load "bigcheese23")) + ,(delay (ly:font-load "bigcheese26")))) + (fetaMusic 20.0 - #(,(delay (ly:make-virtual-font - (ly:font-load "feta11") - (ly:font-load "parmesan11"))) - ,(delay (ly:make-virtual-font - (ly:font-load "feta13") - (ly:font-load "parmesan13"))) - ,(delay (ly:make-virtual-font - (ly:font-load "feta14") - (ly:font-load "parmesan14"))) - ,(delay (ly:make-virtual-font - (ly:font-load "feta16") - (ly:font-load "parmesan16"))) - ,(delay (ly:make-virtual-font - (ly:font-load "feta18") - (ly:font-load "parmesan18"))) -; ,(delay (ly:make-virtual-font (ly:font-load "feta20") (ly:font-load "parmesan20"))) - ,(delay (ly:make-virtual-font (ly:font-load "bigcheese20"))) - ,(delay (ly:make-virtual-font - (ly:font-load "feta23") - (ly:font-load "parmesan23"))) - ,(delay (ly:make-virtual-font - (ly:font-load "feta26") - (ly:font-load "parmesan26"))))) - + #( + ,(delay (ly:font-load "bigcheese11")) + ,(delay (ly:font-load "bigcheese13")) + ,(delay (ly:font-load "bigcheese14")) + ,(delay (ly:font-load "bigcheese16")) + ,(delay (ly:font-load "bigcheese18")) + ,(delay (ly:font-load "bigcheese20")) + ,(delay (ly:font-load "bigcheese23")) + ,(delay (ly:font-load "bigcheese26")))) (fetaBraces 15 #(,(delay (ly:make-virtual-font diff --git a/scm/framework-ps.scm b/scm/framework-ps.scm index 114be63aa9..fb779b2645 100644 --- a/scm/framework-ps.scm +++ b/scm/framework-ps.scm @@ -46,8 +46,14 @@ (equal? (substring fontname 0 2) "ec"))) (define (ps-embed-cff body font-set-name version) - (string-append - (format + (let* + ((binary-data + (string-append + (format "/~a ~s StartData " font-set-name (string-length body)) + body))) + + (string-append + (format "%!PS-Adobe-3.0 Resource-FontSet %%DocumentNeededResources: ProcSet (FontSetInit) %%EndComments @@ -57,18 +63,16 @@ %%Version: ~s /FontSetInit /ProcSet findresource begin %%BeginData: ~s Binary Bytes -/~a ~s StartData " - font-set-name font-set-name version 0 font-set-name (string-length body) +" + font-set-name font-set-name version (string-length binary-data) ) - - body - + binary-data "%%EndData %%EndResource %%EOF " - )) + ))) (define (load-fonts paper) @@ -82,7 +86,6 @@ (cffpath (ly:find-file cffname)) (apath (ly:kpathsea-find-file aname)) (bpath (ly:kpathsea-find-file bname))) - (display (list x cffpath)) (cond (cffpath (ps-embed-cff (ly:gulp-file cffpath) x 0)) (apath (ly:gulp-file apath)) @@ -91,7 +94,7 @@ (ly:warn "cannot find T42/PFA/PFB font ~S" x) "")))) (filter string? font-names)))) - + (string-join pfas "\n"))) (define (define-fonts paper)