From b690023c78792a05ea55c69d41be63a04f93b43a Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 21 Jun 2005 21:43:36 +0000 Subject: [PATCH] *** empty log message *** --- ChangeLog | 19 ++++++++++++------- ly/music-functions-init.ly | 3 +++ make/mutopia-rules.make | 2 +- scm/lily.scm | 7 ++----- scm/ps-to-png.scm | 2 +- ttftool/parse.c | 22 ++++++++++++++++------ 6 files changed, 35 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 683ea3c586..8d67369665 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ +2005-06-20 Han-Wen Nienhuys + + * ly/music-functions-init.ly (musicMap): new music function + musicMap. + 2005-06-19 Han-Wen Nienhuys + * make/mutopia-rules.make: anti-alias-factor = 2 + * scm/ps-to-png.scm (make-ps-images): cleanup multipage vs. single page switch. @@ -10,15 +17,13 @@ (my-system): new function. (make-ps-images): blow up GS resolution by anti-alias-factor, scale down image by anti-alias-factor. This improves appearance - of - (make-ps-images): remove showpage. Fixes spurious empty png at end. + of bitmaps + (make-ps-images): remove showpage. Fixes spurious empty png at + end. * scm/framework-ps.scm (write-preamble): downcase filename before string-matching. Should fix .TTF files (as opposed to ttf files) - * scm/lily.scm (lambda): default resolution 116 (8 pixels per - space). - * Documentation/user/tutorial.itely (Running LilyPond for the first time): separate subsections for windows, macos and unix. @@ -28,7 +33,7 @@ 2005-06-18 Han-Wen Nienhuys * Documentation/user/introduction.itely (Engraving): don't include - file, add file directly. + file optical-spacing, add directly. * lily/paper-outputter.cc (file): open file in binary mode. This fixes OTF embedding on windows. @@ -41,7 +46,7 @@ * mf/GNUmakefile ($(outdir)/fonts.cache-1): create font cache for outdir. - (install-fc-cache): insatll font cache in installation directories. + (install-fc-cache): install font cache in installation directories. 2005-06-17 Jan Nieuwenhuizen diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index 74ebf1f8e5..f42bdd50d6 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -26,6 +26,9 @@ applycontext = #(def-music-function (parser location proc) (procedure?) 'origin location 'procedure proc)) +musicMap = #(def-music-function (parser location proc mus) (procedure? ly:music?) + (music-map proc mus)) + displayMusic = #(def-music-function (parser location music) (ly:music?) (display-scheme-music music) music) diff --git a/make/mutopia-rules.make b/make/mutopia-rules.make index a4c287cb82..fd35071131 100644 --- a/make/mutopia-rules.make +++ b/make/mutopia-rules.make @@ -15,7 +15,7 @@ $(outdir)/%.ly: %.abc # hmm. notdir builds srcdir builds? $(outdir)/%.png $(outdir)/%.pdf $(outdir)/%.ly $(outdir)/%.ps: $(outdir)/%.ly - cd $(outdir); $(LILYPOND) --pdf --png -ddelete-intermediate-files -dno-point-and-click -I $(shell pwd)/ $(notdir $<) + cd $(outdir); $(LILYPOND) --pdf --png -danti-alias-factor=2 -ddelete-intermediate-files -dno-point-and-click -I $(shell pwd)/ $(notdir $<) touch $(outdir)/$(basename $(notdir $<)).png $(outdir)/%.ly: %.ly diff --git a/scm/lily.scm b/scm/lily.scm index 06e41889fc..d73b883b51 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -19,11 +19,8 @@ on errors, and print a stack trace.") "relative for simultaneous music works similar to chord syntax") - ;; at 101.178, a staff space is exactly 7 pixels. - ;; 115.63 = 8 pixels - ;; 86 = 6 pixels - (resolution 90 "resolution for generating bitmaps") - (anti-alias-factor 1 "blow up resolution and scale to prevent jaggies in PNG") + (resolution 101 "resolution for generating bitmaps") + (anti-alias-factor 1 "render at higher resolution and scale down result\nto prevent jaggies in PNG") (preview-include-book-title #t "include book-titles in preview images.") (gs-font-load #f "load fonts via Ghostscript.") diff --git a/scm/ps-to-png.scm b/scm/ps-to-png.scm index 83f9160385..dfcb9551b0 100644 --- a/scm/ps-to-png.scm +++ b/scm/ps-to-png.scm @@ -107,7 +107,7 @@ (rename-file file old) (my-system be-verbose #t - (format #f "convert -scale '~a%' ~a ~a" percentage old file)) + (format #f "convert -scale \"~a%\" ~a ~a" percentage old file)) (delete-file old) )) diff --git a/ttftool/parse.c b/ttftool/parse.c index d198475c4b..cf43152b07 100644 --- a/ttftool/parse.c +++ b/ttftool/parse.c @@ -149,10 +149,10 @@ readHeadTable (FILE *fd, struct HeadTable *ht) } int -readPostTable (FILE *fd, int nglyphs, struct PostTable *pt, +readPostTable (FILE *fd, int root_nglyphs, struct PostTable *pt, struct GlyphName **gt) { - USHORT nglyphspost; + USHORT nglyphs; USHORT *glyphNameIndex; struct GlyphName *glyphNames; char **glyphNamesTemp; @@ -172,10 +172,20 @@ readPostTable (FILE *fd, int nglyphs, struct PostTable *pt, case 2: if (pt->formatType.fraction != 0) ttf_error ("Unsupported `post' table format"); - surely_read (fd, &nglyphspost, sizeof (USHORT)); - FIX_UH (nglyphspost); - if (nglyphspost != nglyphs) - ttf_error ("Inconsistency between `maxp' and `nglyphs' tables!"); + surely_read (fd, &nglyphs, sizeof (USHORT)); + + /*from freetype2: + */ + /* + UNDOCUMENTED! The number of glyphs in this table can be smaller + than the value in the maxp table (cf. cyberbit.ttf). + */ + FIX_UH (nglyphs); + if (nglyphs > root_nglyphs) + { + fprintf (stderr, "More glyphs in 'post' table than in 'maxp' table"); + } + if (ttf_verbosity >= 2) fprintf (stderr, " %d glyphs\n", nglyphs); glyphNameIndex = mymalloc (sizeof (USHORT) * nglyphs); -- 2.39.2