]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/main.cc (setup_paths): either add mf/out to search path or
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 6 Apr 2005 12:14:41 +0000 (12:14 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 6 Apr 2005 12:14:41 +0000 (12:14 +0000)
fonts/{otf,type1,etc}

* lily/font-config.cc (init_fontconfig): either add mf/out to
FontConfig or fonts/{otf,type1,etc}

* GNUmakefile.in: don't put mf/ link in share/ dir.

* lily/font-config.cc (init_fontconfig): add operator pacification
message.

ChangeLog
GNUmakefile.in
lily/font-config.cc
lily/main.cc
mf/GNUmakefile

index 07e6c15e3a9cc607555a464c060d250cac0389d8..b50bd89ba781530e61174f9a4bdbf796ffd0b856 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2005-04-06  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * lily/main.cc (setup_paths): either add mf/out to search path or 
+       fonts/{otf,type1,etc}
+       
+       * lily/font-config.cc (init_fontconfig): either add mf/out to
+       FontConfig or fonts/{otf,type1,etc}
+
+       * GNUmakefile.in: don't put mf/ link in share/ dir.
+
        * lily/staff-spacing.cc: move same-direction-correction to note-spacing-interface
 
        * scm/lily.scm (lilypond-main): use variable argument count for
index 1a5613ff98c38b5aa5bea2d0d507977bdf0926fe..e654362a75dd6ec4512a5fffce3e0ec803093267 100644 (file)
@@ -110,15 +110,17 @@ $(tree-prefix)/lilypond-force: GNUmakefile
        mkdir -p $(tree-prefix)/dvips
        mkdir -p $(tree-prefix)/elisp
        mkdir -p $(tree-prefix)/fonts
+       mkdir -p $(tree-prefix)/fonts/otf
+       mkdir -p $(tree-prefix)/fonts/tfm
+       mkdir -p $(tree-prefix)/fonts/type1
+       mkdir -p $(tree-prefix)/fonts/svg
+       mkdir -p $(tree-prefix)/fonts/map
+       mkdir -p $(tree-prefix)/fonts/enc
        mkdir -p $(tree-prefix)/tex
        cd $(builddir)/lib && \
                ln -s  ../../../python/$(outconfbase) python
        cd $(tree-prefix) && \
                ln -s $(abs-srcdir)/ly ly && \
-               ln -s ../../../mf/$(outconfbase) otf && \
-               ln -s ../../../mf/$(outconfbase) svg && \
-               ln -s ../../../mf/$(outconfbase) tfm && \
-               ln -s $(abs-srcdir)/mf && \
                ln -s $(abs-srcdir)/ps && \
                ln -s ../../../python/$(outconfbase) python && \
                ln -s $(abs-srcdir)/scm && \
@@ -130,14 +132,19 @@ $(tree-prefix)/lilypond-force: GNUmakefile
                ln -s $(abs-srcdir)/tex source && \
                ln -s ../../../../tex/$(outconfbase) tex-out && \
                ln -s ../../../../mf/$(outconfbase) mf-out
+       cd $(tree-prefix)/fonts/type1 && \
+               ln -s ../../../../../mf/$(outconfbase)/*.pfa .
+       cd $(tree-prefix)/fonts/otf && \
+               ln -s ../../../../../mf/$(outconfbase)/*.otf .
+       cd $(tree-prefix)/fonts/svg && \
+               ln -s ../../../../../mf/$(outconfbase)/*.svg .
+       cd $(tree-prefix)/fonts/tfm && \
+               ln -s ../../../../../mf/$(outconfbase)/*.tfm .
+       cd $(tree-prefix)/fonts/enc && \
+               ln -s ../../../../../mf/$(outconfbase)/*.enc .
        cd $(tree-prefix)/fonts && \
                ln -s $(abs-srcdir)/mf source && \
-               ln -s ../../../../tex/$(outconfbase) enc && \
-               ln -s ../../../../mf/$(outconfbase) map && \
-               ln -s ../../../../mf/$(outconfbase) otf && \
-               ln -s ../../../../mf/$(outconfbase) tfm && \
-               ln -s ../../../../mf/$(outconfbase) svg && \
-               ln -s ../../../../mf/$(outconfbase) type1
+               true
        cd $(tree-prefix)/elisp && \
                ln -sf ../../../../../elisp/$(outconfbase)/lilypond-words.el . && \
                ln -s $(abs-srcdir)/elisp/*.el .
index 08378da3a7ac736d9052fa5ab1a258dc177d3f4b..eb8b4f80c00cf8c619b36ddccf2c1e5b1c3d54b1 100644 (file)
@@ -28,12 +28,22 @@ init_fontconfig ()
   FcConfig *fcc = FcConfigGetCurrent ();
 
   Array<String> dirs;
-  dirs.push (prefix_directory + "/mf/out/");
-  
-  dirs.push (prefix_directory + "/fonts/otf/");
-  dirs.push (prefix_directory + "/fonts/type1/");
-  dirs.push (prefix_directory + "/fonts/cff/");
 
+
+  struct stat statbuf; 
+  String builddir = prefix_directory + "/mf/out/";
+  if (stat (builddir.to_str0 (), &statbuf) != 0)
+    {
+      dirs.push (builddir.to_str0 ());
+    }
+  else
+    {
+      dirs.push (prefix_directory + "/fonts/otf/");
+      dirs.push (prefix_directory + "/fonts/type1/");
+      dirs.push (prefix_directory + "/fonts/cff/");
+      dirs.push (prefix_directory + "/fonts/svg/");
+  }
+  
   for (int i = 0; i < dirs.size (); i++)
     {
       String dir = dirs[i];
index 80095fa9af97c4c5f790de42dc1c2a5298d823ef..ef8f60679f1a6ccdc635c41871f2d233933102cb 100644 (file)
@@ -16,6 +16,7 @@
 #include <pwd.h>
 #include <grp.h>
 #include <sys/types.h>
+#include <sys/stat.h>
 
 #include "config.hh"
 
@@ -234,15 +235,35 @@ setup_paths ()
 
   /* Adding mf/out make lilypond unchanged source directory, when setting
      LILYPONDPREFIX to lilypond-x.y.z */
-  char *suffixes[] = {"ly", "fonts/cff", "fonts/otf", "mf/out", "scm",
-                     "fonts/tfm", "ps", "fonts/svg",
-                     0};
+  char *suffixes[] = {"ly", "ps", "scm", 0 };
 
+  Array<String> dirs;
   for (char **s = suffixes; *s; s++)
     {
       String path = prefix_directory + to_string ('/') + String (*s);
-      global_path.prepend (path);
+      dirs.push (path);
     }
+
+  /*
+    ugh. C&P font-config.cc
+  */
+  struct stat statbuf; 
+  String builddir = prefix_directory + "/mf/out/";
+  if (stat (builddir.to_str0 (), &statbuf) == 0)
+    {
+      dirs.push (builddir.to_str0 ());
+    }
+  else
+    {
+      dirs.push (prefix_directory + "/fonts/otf/");
+      dirs.push (prefix_directory + "/fonts/type1/");
+      dirs.push (prefix_directory + "/fonts/cff/");
+      dirs.push (prefix_directory + "/fonts/svg/");
+      dirs.push (prefix_directory + "/fonts/cff/");
+    }
+
+  for (int i = 0; i < dirs.size (); i++)
+    global_path.prepend (dirs[i]);  
 }
   
 static void
index bd4e0ab3e69a6e20c7f2c7e908329329220227a2..f0d455656eec118b25a119e8ab1c2381aaee4595 100644 (file)
@@ -59,6 +59,7 @@ MFTRACE_FLAGS=$(if $(ENCODING_FILE),--encoding $(ENCODING_FILE),) --no-afm
 $(outdir)/%.cff.ps $(outdir)/PFA%.pfa $(outdir)/%.cff $(outdir)/%.otf $(outdir)/%.svg: $(outdir)/%.pe
        (cd $(outdir) && $(FONTFORGE) -script $(notdir $<))
        $(PYTHON) $(buildscript-dir)/ps-embed-cff.py $(basename $<).cff `cat $(basename $<).fontname` $(basename $<).cff.ps
+       -rm $(outdir)/*.scale.pfa
 
 
 $(outdir)/%.otf-table: $(outdir)/%.lisp $(if $(findstring brace,$<),,$(subst feta,parmesan,$<)) 
@@ -174,7 +175,7 @@ $(outdir)/%.lisp $(outdir)/%.otf-gtable $(outdir)/%.enc  $(outdir)/%.tex $(outdi
 fontdir: $(addprefix $(outdir)/, lilypond.map lilypond.sfd private-fonts fonts.scale fonts.dir Fontmap.lily)
 
 
-$(outdir)/lilypond.map: $(AFM_FILES)
+$(outdir)/lilypond.map:
        for i in $(FETA_FONTS); do echo $$i $$i '<'$$i.pfa; done > $@
        for i in $(STAFF_SIZES); \
                do echo "Emmentaler-$$i Emmentaler-$$i <emmentaler-$$i.cff.ps" ; done \