From c48b40e2b1ec9cded18b5267463116347173c46f Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 31 Dec 2004 13:14:09 +0000 Subject: [PATCH] ($(outdir)/%.otf-table): use findstring. Fixes brace generation. --- ChangeLog | 7 +++++++ mf/GNUmakefile | 49 +++-------------------------------------------- scm/output-ps.scm | 14 ++++++++++---- 3 files changed, 20 insertions(+), 50 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4397d8c7c7..ca5108a5c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-12-31 Han-Wen Nienhuys + + * mf/GNUmakefile ($(outdir)/%.otf-table): use findstring. Fixes + brace generation. + + * lily/text-metrics.cc (LY_DEFINE): use scm_c_make_hash_table(). + 2004-12-30 Jan Nieuwenhuizen * mf/GNUmakefile (INSTALLATION_OUT_SUFFIXES): Do not try to diff --git a/mf/GNUmakefile b/mf/GNUmakefile index 23668c69a1..fafc83cae7 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -60,7 +60,9 @@ $(outdir)/%.otf $(outdir)/%.svg: $(outdir)/%.pe (cd $(outdir) && fontforge -script $(notdir $<)) $(outdir)/%.otf-table: $(outdir)/%.lisp - cat $< $(subst feta,parmesan,$<) $(subst feta,feta-alphabet,$<) > $@ + cat $< \ + $(if $(findstring brace,$<),,$(subst feta,parmesan,$<)) \ + $(if $(findstring brace,$<),,$(subst feta,feta-alphabet,$<)) > $@ $(outdir)/aybabtu.otf: $(outdir)/aybabtu.subfonts $(outdir)/aybabtu.otf-table $(outdir)/aybabtu.otf-gtable @@ -163,40 +165,6 @@ $(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) -### Urg -#mapentry=$(1) $(shell fgrep FontName $(outdir)/$(1).afm | sed -e 's/FontName *//') <$(1).pfaX -# -#map = $(foreach a,$(2),$(call $(1),$(a))) -#$(outdir)/lilypond.xmap: $(AFM_FILES) -# echo '$(call map,mapentry,$(ALL_FONTS))' | \ -# tr 'X' '\n' | sed -e 's/^ *//'> $@ -# -## using shell for loop seems most robust -#$(outdir)/lilypond.map: $(AFM_FILES) -# for i in $(FETA_FONTS); do echo $$i $$(fgrep FontName $(outdir)/$$i.afm | sed -e 's/FontName *//') '<'$$i.pfa; done > $@ -# -#$(outdir)/Fontmap: -# echo '%!' > $@ -# echo '% Override default GS Fontmap' >> $@ -# echo '% To let gs load fonts from builddir, do:' >> $@ -# echo '% export GS_LIB=$$(pwd)/mf/out:' >> $@ -# echo '% See Fontmap.GS for the syntax of real Fontmap files.' >> $@ -# echo '(Fontmap.GS) .runlibfile' >> $@ -# echo '(Fontmap.lily) .runlibfile' >> $@ -# -#$(outdir)/Fontmap.lily: $(AFM_FILES) $(outdir)/Fontmap -# echo '%!' > $@ -# for i in $(FETA_FONTS); do echo "/$$(fgrep FontName $(outdir)/$$i.afm | sed -e 's/FontName *//') ($$i.pfa);"; done >> $@ -# -# -#$(outdir)/fonts.scale: $(PFA_FILES) -## cd $(outdir) && echo $(FETA_MF_FILES:.mf=.pfa) $(FETA_MF_FILES:.mf=.pfb) | $(PYTHON) $(topdir)/buildscripts/make-font-dir.py > $(@F) -# cd $(outdir) && echo *.pfa *.pfb | $(PYTHON) $(topdir)/buildscripts/make-font-dir.py > $(@F) -# -#$(outdir)/fonts.dir: $(outdir)/fonts.scale -# cd $(outdir) && mkfontdir -# - $(outdir)/lilypond.map: $(AFM_FILES) for i in $(FETA_FONTS); do echo $$i $$i '<'$$i.pfa; done > $@ @@ -206,16 +174,5 @@ local-clean: rm -f mfplain.mem mfplain.log rm -f *.tfm *.log -#afm: $(AFM_FILES) -#pfa: afm $(PFA_FILES) fontdir -#pfb: afm $(PFB_FILES) fontdir -# -# -# stupid trick to have separate rules for each PFA font ; -# otherwise building PFAs is all-or-nothing. - -#$(outdir)/%.pfa: $(outdir)/%.bla -# $(MFTRACE) -I $(outdir)/ --formats=pfa,pfb,svg --simplify --keep-trying $(notdir $(basename $@)) && mv $(notdir $@) $(outdir)/ - $(outdir)/%.enc.in: %.enc cp $< $@ diff --git a/scm/output-ps.scm b/scm/output-ps.scm index 70140b3624..b3d317c274 100644 --- a/scm/output-ps.scm +++ b/scm/output-ps.scm @@ -179,10 +179,16 @@ (apply string-append (map (lambda (item) - (format #f " ~a ~a rmoveto /~a glyphshow " - (car item) - (cadr item) - (caddr item))) + (let + ((x (car item)) + (y (cadr item)) + (g (caddr item))) + + (if (and (= 0.0 x) + (= 0.0 y)) + (format #f " /~a glyphshow " g) + (format #f " ~a ~a rmoveto /~a glyphshow " + x y g)))) x-y-named-glyphs)) )) -- 2.39.5