From f803dfe5c67d7a51f3b9b347f41fe43005963810 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 1 Jan 2006 20:19:52 +0000 Subject: [PATCH] * mf/GNUmakefile ($(NCSB_TTFS)): revise rule. Create .ttf instead of c059XXXttf. * lily/program-option.cc (LY_DEFINE): special support for --verbose, so it works before option init too. * mf/GNUmakefile (local-install): oops. * buildscripts/pfx2ttf.fontforge: new file. * mf/GNUmakefile (NCSB_PATH): add vars for NCSB. ($(outdir)/%.ttf): new rule. --- ChangeLog | 6 ++++++ GNUmakefile.in | 2 +- buildscripts/pfx2ttf.fontforge | 2 +- lily/lily-guile.cc | 7 ++++++- lily/main.cc | 2 -- lily/program-option.cc | 6 ++++++ mf/GNUmakefile | 17 +++++++++-------- scm/lily.scm | 8 ++++++-- 8 files changed, 35 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index da1c4f63e4..93b1772d7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2006-01-01 Han-Wen Nienhuys + * mf/GNUmakefile ($(NCSB_TTFS)): revise rule. Create + .ttf instead of c059XXXttf. + + * lily/program-option.cc (LY_DEFINE): special support for + --verbose, so it works before option init too. + * mf/GNUmakefile (local-install): oops. * lily/lyric-hyphen.cc (print): oops. diff --git a/GNUmakefile.in b/GNUmakefile.in index 5617475a68..332676d2c2 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -163,7 +163,7 @@ $(tree-share-prefix)/lilypond-force link-tree: GNUmakefile $(tree-share-prefix)/mf-link-tree link-mf-tree: $(tree-share-prefix)/lilypond-force -rm -f $(tree-share-prefix)/fonts/{otf,svg,tfm,type1}/* && \ cd $(tree-share-prefix)/fonts/otf && \ - ln -s ../../../../../../mf/$(outconfbase)/*.otf . + ln -s ../../../../../../mf/$(outconfbase)/*.{otf,ttf} . -cd $(tree-share-prefix)/fonts/svg && \ ln -s ../../../../../../mf/$(outconfbase)/*.svg . -cd $(tree-share-prefix)/fonts/tfm && \ diff --git a/buildscripts/pfx2ttf.fontforge b/buildscripts/pfx2ttf.fontforge index 914d1d1e7c..dc1eb58723 100644 --- a/buildscripts/pfx2ttf.fontforge +++ b/buildscripts/pfx2ttf.fontforge @@ -2,5 +2,5 @@ Open($1); MergeKern($2) -Generate($3); +Generate($3 + $fontname + ".ttf"); diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 5211af49c2..4a9366110a 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -196,7 +196,12 @@ ly_init_ly_module (void *) (scm_init_funcs_->elem (i)) (); if (be_verbose_global) - progress_indication ("\n"); + { + progress_indication ("["); + scm_display (scm_c_eval_string ("(%search-load-path \"lily.scm\")"), + scm_current_error_port ()); + progress_indication ("]\n"); + } scm_primitive_load_path (scm_makfrom0str ("lily.scm")); } diff --git a/lily/main.cc b/lily/main.cc index a6756fc3ce..4bbf7cf939 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -387,8 +387,6 @@ main_with_guile (void *, int, char **) ly_c_init_guile (); call_constructors (); - ly_set_option (ly_symbol2scm ("verbose"), scm_from_bool (be_verbose_global)); - init_global_tweak_registry (); init_fontconfig (); diff --git a/lily/program-option.cc b/lily/program-option.cc index 2963fe32c8..cd3b857818 100644 --- a/lily/program-option.cc +++ b/lily/program-option.cc @@ -189,6 +189,12 @@ LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val), return SCM_UNSPECIFIED; } +LY_DEFINE (ly_command_line_verbose_p, "ly:command-line-verbose?", 0, 0, 0, (), + "Was be_verbose_global set?") +{ + return scm_from_bool (be_verbose_global); +} + LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var), "Get a global option setting.") { diff --git a/mf/GNUmakefile b/mf/GNUmakefile index a56e3c4710..92586b0f20 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -34,8 +34,8 @@ FETA_FONTS = $(FETA_MF_FILES:.mf=) SVG_FILES = $(OTF_FILES:%.otf=%.svg) $(ALL_FONTS:%=$(outdir)/%.svg) -NCSB_FILES=c059013l c059016l c059033l c059036l -NCSB_TTFS=$(addprefix $(outdir)/,$(addsuffix .ttf, $(NCSB_FILES))) +NCSB_SOURCE_FILES=c059013l c059016l c059033l c059036l +NCSB_TTFS=$(addprefix $(outdir)/,CenturySchL-Ital.ttf CenturySchL-BoldItal.ttf CenturySchL-Roma.ttf CenturySchL-Bold.ttf) NCSB_PATH=/usr/share/fonts/default/Type1 NCSB_INSTALL_DIR=$(local_lilypond_datadir)/fonts/otf @@ -177,14 +177,16 @@ INSTALLATION_OUT_FILES9=$(SVG_FILES) export MFINPUTS:=.:$(MFINPUTS) + + +default: pfa_warning $(ALL_GEN_FILES) $(outdir)/emmentaler-20.otf tree-regen + .PHONY: tree-regen # FIXME: temporary hack: must regenerate after building fonts tree-regen: ${MAKE} -C $(top-build-dir) link-mf-tree -default: pfa_warning $(ALL_GEN_FILES) $(outdir)/emmentaler-20.otf tree-regen - pfa_warning: ifneq ($(shell $(MFTRACE) --version | sed 's/ .*//'),mftrace) @echo "" @@ -254,8 +256,7 @@ local-uninstall: -rmdir $(DESTDIR)$(local_lilypond_datadir)/dvips -$(outdir)/%.ttf: $(NCSB_PATH)/%.pfb - $(foreach i,$(NCSB_FILES), \ +$(NCSB_TTFS): $(addsuffix .pfb,$(addprefix $(NCSB_PATH)/,$(NCSB_SOURCE_FILES))) + $(foreach i,$(NCSB_SOURCE_FILES), \ $(FONTFORGE) -script $(buildscript-dir)/pfx2ttf.fontforge \ - $(NCSB_PATH)/$(i).pfb $(NCSB_PATH)/$(i).afm \ - $(outdir)/$(i).ttf && ) true + $(NCSB_PATH)/$(i).pfb $(NCSB_PATH)/$(i).afm $(outdir)/ && ) true diff --git a/scm/lily.scm b/scm/lily.scm index ed56afc11d..961f87c62c 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -31,7 +31,7 @@ similar to chord syntax") (gui #f "running from gui; redirect stderr to log file") (delete-intermediate-files #f "delete unusable PostScript files") - (verbose #f "value for the --verbose flag") + (verbose (ly:command-line-verbose?) "value for the --verbose flag") (ttf-verbosity 0 "how much verbosity for TTF font embedding?") (debug-gc #f @@ -353,7 +353,7 @@ The syntax is the same as `define*-public'." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define-public (lilypond-main files) "Entry point for LilyPond." - + (define (no-files-handler) (ly:usage) (exit 2)) @@ -375,9 +375,12 @@ The syntax is the same as `define*-public'." (exit 0))))) (define-public (lilypond-all files) + + blablalblah (let* ((failed '()) (handler (lambda (key failed-file) (set! failed (append (list failed-file) failed))))) + (for-each (lambda (x) (lilypond-file handler x) @@ -404,6 +407,7 @@ The syntax is the same as `define*-public'." (ly:message (_ "Redirecting output to ~a...") log-name)) (ly:stderr-redirect log-name "w") (ly:message "# -*-compilation-*-") + (let ((failed (lilypond-all files))) (if (pair? failed) (begin -- 2.39.5