]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/dots.cc (print): replace -
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 12 Dec 2004 21:27:26 +0000 (21:27 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 12 Dec 2004 21:27:26 +0000 (21:27 +0000)
* 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.

42 files changed:
ChangeLog
buildscripts/gen-bigcheese-scripts.py [new file with mode: 0644]
buildscripts/mf-to-table.py
lily/dots.cc
lily/font-metric.cc
lily/include/font-metric.hh
lily/include/open-type-font.hh
lily/open-type-font.cc
mf/GNUmakefile
mf/bigcheese.pe.in
mf/feta-alphabet.mf [new file with mode: 0644]
mf/feta-alphabet11.mf [new file with mode: 0644]
mf/feta-alphabet13.mf [new file with mode: 0644]
mf/feta-alphabet14.mf [new file with mode: 0644]
mf/feta-alphabet16.mf [new file with mode: 0644]
mf/feta-alphabet18.mf [new file with mode: 0644]
mf/feta-alphabet20.mf [new file with mode: 0644]
mf/feta-alphabet23.mf [new file with mode: 0644]
mf/feta-alphabet26.mf [new file with mode: 0644]
mf/feta-din-code.mf
mf/feta-din.mf
mf/feta-din10.mf [deleted file]
mf/feta-din12.mf [deleted file]
mf/feta-din14.mf [deleted file]
mf/feta-din17.mf [deleted file]
mf/feta-din6.mf [deleted file]
mf/feta-din8.mf [deleted file]
mf/feta-nummer-code.mf
mf/feta-nummer.mf
mf/feta-nummer10.mf [deleted file]
mf/feta-nummer12.mf [deleted file]
mf/feta-nummer16.mf [deleted file]
mf/feta-nummer20.mf [deleted file]
mf/feta-nummer23.mf [deleted file]
mf/feta-nummer26.mf [deleted file]
mf/feta-nummer4.mf [deleted file]
mf/feta-nummer6.mf [deleted file]
mf/feta-nummer8.mf [deleted file]
mf/feta-schrift.mf
mf/feta26.mf
scm/font.scm
scm/framework-ps.scm

index 3026e59237335ec3e8ae6a28c8601f2110711feb..bb164bac127469e8e1709f8d8c5a0603c8ee3b83 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2004-12-12  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * 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  <janneke@gnu.org>
 
        * 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 (file)
index 0000000..3cf300f
--- /dev/null
@@ -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
+       <Peter.Anvin@linux.org>.
+*/
+  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)
index 22afb3e9ea64144be6e012b2f8f4cc34cdf43027..63632ff899aee8fca2c5041861ddc59a3303c032 100644 (file)
@@ -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,
index 1cd07bb3ca11e72583b8436a4a4777b4aff2041d..0fd24ae0a9f902fe6dd468ff8569a9f2c1fdf4c8 100644 (file)
@@ -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 ();
       
 
index 0bfbca0adeb176c8c499b64dfa0fbf4693cc3be4..12c2d6039894329ca132c1f75c7cf93eeb4ce0d0 100644 (file)
@@ -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);
+}
index 7184c752aa584c998d8286984c8d32856cfc9c9b..f9fe247f3d4c55ca98785e18162d5726ac0f73e1 100644 (file)
@@ -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;
index e50166ad73445d612259d9336f8b6e01be71be36..c6e4e0c740aca92f05e8a38d8273f658bbfbe122 100644 (file)
 
 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;
index ab666a43fa24fa34dffa0a133568f44bfdc97f17..5d5f3501bc57515750992fe69268f6e1ca0c36d6 100644 (file)
@@ -9,10 +9,38 @@
 
 #include <stdio.h>
 
+#include <freetype/tttables.h>
 #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_);
index 831e68cbf6a13f4dc538aa2ebb996a13b2a42500..2ad3b6b4be80f8caf5f87935d7555bf93bd5e077 100644 (file)
@@ -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
index e6235a1882f06ac94d2273d313ad89a8161819c6..46b74f0abf3a912201fa34eaa06a544e6b92f0aa 100644 (file)
@@ -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 (file)
index 0000000..a4b672a
--- /dev/null
@@ -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 (file)
index 0000000..3e1ae14
--- /dev/null
@@ -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 (file)
index 0000000..93d286a
--- /dev/null
@@ -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 (file)
index 0000000..58cbf2b
--- /dev/null
@@ -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 (file)
index 0000000..b5f7691
--- /dev/null
@@ -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 (file)
index 0000000..488b381
--- /dev/null
@@ -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 (file)
index 0000000..708f91c
--- /dev/null
@@ -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 (file)
index 0000000..c0b678b
--- /dev/null
@@ -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 (file)
index 0000000..488b381
--- /dev/null
@@ -0,0 +1,6 @@
+% part of LilyPond's pretty-but-neat music font
+
+staffheight := 17.82;
+input feta-alphabet;
+end.
+
index 4f097510a08b6a1851ba03436cb217c0c257b6a2..34203e3a07cb440a47da227f8b59bb88b054ffcb 100644 (file)
@@ -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.
index 5294f2df7d81ef1e51f22d58f57521ca98d70b5a..329b4e4f08873020f12406155b39ac159efc25d6 100644 (file)
@@ -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 (file)
index 55a476a..0000000
+++ /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 (file)
index f444107..0000000
+++ /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 (file)
index 178c19a..0000000
+++ /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 (file)
index 516f9c1..0000000
+++ /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 (file)
index efaf13d..0000000
+++ /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 (file)
index 32767f6..0000000
+++ /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;
-
index 16d69e15b0c1397ca4ca61c7efd590bd513ed98b..0d27d9173bff9007b125786233f14a50a1f6442c 100644 (file)
@@ -6,6 +6,42 @@
 % 
 % (c) 1997--2004 Jan Nieuwenhuizen <janneke@gnu.org>
 
+
+
+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.
index 07106b6c1db55dac9391d1c86d3eb46497d61e8e..f732fae83c97deca847b559ed32413035f1140d7 100644 (file)
@@ -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 (file)
index 2c6e8f5..0000000
+++ /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 (file)
index c3e868d..0000000
+++ /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 (file)
index 92423b0..0000000
+++ /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 (file)
index 8ddfd9e..0000000
+++ /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 (file)
index d324151..0000000
+++ /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 (file)
index a9308dd..0000000
+++ /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 (file)
index ebe2cfc..0000000
+++ /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 (file)
index 4038deb..0000000
+++ /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 (file)
index a35b177..0000000
+++ /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.
index 02c8de5b06ff6dba76fdf611e7afe95e111777bf..2bcce9a7190e3f75a0cf857f47d7cda1ee2bdcfb 100644 (file)
@@ -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;
 
 
index 7df8ac277c5f6a5fbe68f5bff38e3bf44db0029f..8e141de3b80317e2f08242d5b21d0b70e2e8444c 100644 (file)
@@ -1,4 +1,4 @@
-% feta16.mf
+% feta26.mf
 % part of LilyPond's pretty-but-neat music font
 
 input feta-autometric;
index dde5e6f817bf581ba0295064427f8c1b05513eef..7e1677764a4524c156726cbecfdb5cadb5aa6048 100644 (file)
               (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
index 114be63aa91da86858ae8479c896f7df5a666355..fb779b2645228546649376859830463ef394500a 100644 (file)
    (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
 %%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)