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
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 && \
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 .
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];
#include <pwd.h>
#include <grp.h>
#include <sys/types.h>
+#include <sys/stat.h>
#include "config.hh"
/* 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
$(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,$<))
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 \