* mf/GNUmakefile ($(outdir)/lilypond.map): add .cff.ps to .map file.
* stepmake/stepmake/metafont-rules.make ($(outdir)/%.pfb
$(outdir)/%.svg $(outdir)/%.pfa): remove --simplify
+2005-01-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * ly/generate-embedded-cff.ly: write .cff.ps files.
+
+ * mf/GNUmakefile ($(outdir)/lilypond.map): add .cff.ps to .map file.
+
+ * stepmake/stepmake/metafont-rules.make ($(outdir)/%.pfb
+ $(outdir)/%.svg $(outdir)/%.pfa): remove --simplify
+
2005-01-28 Jan Nieuwenhuizen <janneke@gnu.org>
* lily/include/guile-compatibility.hh (SCM_VECTOR_P): Compile fix.
*/
#include "box.hh"
-
#include "array.hh"
void
return Offset (interval_a_[X_AXIS].center (),
interval_a_[Y_AXIS].center ());
}
+
void
Box::widen (Real x, Real y)
{
SCM_ASSERT_TYPE (scm_is_number (amount), amount, SCM_ARG2, __FUNCTION__, "number");
Real real_amount = scm_to_double (amount);
+#if 0
SCM_ASSERT_TYPE (!isinf (real_amount) && !isnan (real_amount),
amount, SCM_ARG2, __FUNCTION__, "finite number");
+#endif
SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
--- /dev/null
+#(define (write-cff name filename)
+ (let*
+ ((body (ly:gulp-file filename))
+ (outname (format "~a.ps" filename))
+ (out-port (open-output-file outname))
+ )
+
+
+ (display (ps-embed-cff body name 0)
+ out-port)
+ ))
+
+#(write-cff "emmentaler-26" "emmentaler26.cff")
+#(write-cff "emmentaler-23" "emmentaler23.cff")
+#(write-cff "emmentaler-20" "emmentaler20.cff")
+#(write-cff "emmentaler-18" "emmentaler18.cff")
+#(write-cff "emmentaler-16" "emmentaler16.cff")
+#(write-cff "emmentaler-14" "emmentaler14.cff")
+#(write-cff "emmentaler-13" "emmentaler13.cff")
+#(write-cff "emmentaler-11" "emmentaler11.cff")
+#(write-cff "aybabtu" "aybabtu.cff")
LILYPOND = $(builddir)/lily/$(outconfbase)/lilypond
LILYPOND_BOOK = $(script-dir)/lilypond-book.py
LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(builddir)/mf/$(outconfbase)/ -I $(builddir)/mf/out/
-LILYPOND_BOOK_FLAGS = --process="lilypond --backend tex --formats=tex --header=texidoc -I $(srcdir)/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"
+LILYPOND_BOOK_FLAGS = --process="lilypond --backend ps --formats=ps --header=texidoc -I $(srcdir)/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"
#texi-html for www only:
LILYPOND_BOOK_FORMAT=$(if $(subst out-www,,$(notdir $(outdir))),texi,texi-html)
FETA_FONTS = $(FETA_MF_FILES:.mf=)
SVG_FILES = $(OTF_FILES:%.otf=%.svg) $(ALL_FONTS:%=$(outdir)/%.svg)
CFF_FILES = $(OTF_FILES:%.otf=%.cff)
+CFF_PS_FILES = $(OTF_FILES:%.otf=%.cff.ps)
$(outdir)/aybabtu.otf-table: $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
$(outdir)/%.cff $(outdir)/%.otf $(outdir)/%.svg: $(outdir)/%.pe
(cd $(outdir) && fontforge -script $(notdir $<))
+$(CFF_PS_FILES): $(CFF_FILES)
+ cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond --verbose $(abs-srcdir)/ly/generate-embedded-cff
+
$(outdir)/%.otf-table: $(outdir)/%.lisp $(if $(findstring brace,$<),,$(subst feta,parmesan,$<))
cat $< \
$(if $(findstring brace,$<),,$(subst feta,parmesan,$<)) \
# Make tfm files first, log files last,
# so that normally log files aren't made twice
-ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(TFM_FILES) $(LOG_FILES) $(ENC_FILES) $(LISP_FILES) $(FETA_LIST_FILES) $(OTF_TABLES) $(PFA_FILES) $(outdir)/lilypond.map $(OTF_FILES) $(SVG_FILES)
+ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(TFM_FILES) $(LOG_FILES) $(ENC_FILES) $(LISP_FILES) $(FETA_LIST_FILES) $(OTF_TABLES) $(PFA_FILES) $(outdir)/lilypond.map $(OTF_FILES) $(SVG_FILES) $(CFF_PS_FILES)
#PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
INSTALLATION_DIR=$(local_lilypond_datadir)/fonts/source
$(outdir)/lilypond.map: $(AFM_FILES)
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 \
+ >> $@
local-clean:
%%EndResource"
font-name body)))
-(define (ps-embed-cff body font-set-name version)
- (let* ((binary-data
- (string-append
- (format "/~a ~s StartData " font-set-name (string-length body))
- body)))
-
- (string-append
- (format
- "%%BeginResource: font ~a
-%!PS-Adobe-3.0 Resource-FontSet
-%%DocumentNeededResources: ProcSet (FontSetInit)
-%%Title: (FontSet/~a)
-%%Version: ~s
-%%EndComments
-%%IncludeResource: ProcSet (FontSetInit)
-%%BeginResource: FontSet (~a)
-/FontSetInit /ProcSet findresource begin
-%%BeginData: ~s Binary Bytes
-"
- font-set-name font-set-name version font-set-name
- (string-length binary-data))
- binary-data
- "\n%%EndData
-%%EndResource
-%%EOF
-%%EndResource
-")))
(define (define-fonts paper)
(define font-list (ly:paper-fonts paper))
(setup paper)))
(define-public (output-framework basename book scopes fields)
-; (display (gc-live-object-stats))
(let* ((filename (format "~a.ps" basename))
(outputter (ly:make-paper-outputter filename
(ly:output-backend)))
)))
(let* ((lines (ly:paper-book-systems book))
- (tex-port (open-output-file (format "~a.tex" basename)))
- (last-line (car (last-pair lines))))
+ (tex-system-port (open-output-file (format "~a-systems.tex" basename)))
+g (last-line (car (last-pair lines))))
(dump-lines lines 1)
(for-each (lambda (c)
- (display (format "\\includegraphics{~a-~a.eps}%\n"
- basename (1+ c)) tex-port))
+ (display (format "\\lilypondEpsGraphics{~a-~a.eps}%\n"
+ basename (1+ c)) tex-system-port))
(iota (length lines))
)))
(if (not (null? (cdr name-style)))
name-style
(append name-style '("Regular"))))))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define-public (ps-embed-cff body font-set-name version)
+ (let* ((binary-data
+ (string-append
+ (format "/~a ~s StartData " font-set-name (string-length body))
+ body))
+
+ (header
+ (format
+ "%%BeginResource: font ~a
+%!PS-Adobe-3.0 Resource-FontSet
+%%DocumentNeededResources: ProcSet (FontSetInit)
+%%Title: (FontSet/~a)
+%%Version: ~s
+%%EndComments
+%%IncludeResource: ProcSet (FontSetInit)
+%%BeginResource: FontSet (~a)
+/FontSetInit /ProcSet findresource begin
+%%BeginData: ~s Binary Bytes
+"
+ font-set-name font-set-name version font-set-name
+ (string-length binary-data)))
+ (footer "\n%%EndData
+%%EndResource
+%%EOF
+%%EndResource"))
+
+ (string-append
+ header
+ binary-data
+ footer)))
verbose_p = 0
pseudo_filter_p = 0
original_dir = os.getcwd ()
+backend = 'ps'
help_summary = _ (
'''Process LilyPond snippets in hybrid HTML, LaTeX, or texinfo document.
or glob.glob (base + '-page*.png'))
return not ok
def texstr_is_outdated (self):
+ if backend == 'ps':
+ return 0
+
base = self.basename ()
ok = self.ly_is_outdated ()
ok = ok and (os.path.exists (base + '.texstr'))
format = a
if a == 'texi-html' or a == 'texi':
format = TEXINFO
+ elif o == '--tex-backend ':
+ backend = 'tex'
elif o == '--help' or o == '-h':
ly.help ()
sys.exit (0)