From a5610bf2b19f422584ec9d58760e326503d4d2b0 Mon Sep 17 00:00:00 2001 From: hanwen Date: Thu, 24 Feb 2005 23:02:16 +0000 Subject: [PATCH] *** empty log message *** --- flower/memory-stream.cc | 1 + ly/engraver-init.ly | 7 ++ ttftool/ps.c | 144 ---------------------------------------- ttftool/ttfps.c | 9 --- 4 files changed, 8 insertions(+), 153 deletions(-) diff --git a/flower/memory-stream.cc b/flower/memory-stream.cc index 845a19885b..9a9fbd4351 100644 --- a/flower/memory-stream.cc +++ b/flower/memory-stream.cc @@ -10,6 +10,7 @@ #include #include #include + #include "memory-stream.hh" diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index f2df8b5185..9882f17e37 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -839,3 +839,10 @@ EasyNotation = \context { % TODO: why \context override? % Score.timing = ##f % Score.barAlways = ##t } + + +RemoveEmptyRhythmicStaffContext= \context { + \RhythmicStaff + \remove "Axis_group_engraver" + \consists "Hara_kiri_engraver" +} diff --git a/ttftool/ps.c b/ttftool/ps.c index ccf4a16b7f..3d8e786c74 100644 --- a/ttftool/ps.c +++ b/ttftool/ps.c @@ -152,147 +152,3 @@ printPSTrailer (FILE * out, int nglyphs, int postType, struct GlyphName *gnt) fprintf (out, "end readonly def\n"); fprintf (out, "FontName currentdict end definefont pop\n"); } - -void -printAFM (FILE * afm, struct HeadTable *ht, - char **strings, int nglyphs, int postType, - struct PostTable *pt, struct GlyphName *gnt, - struct Box *bbox, struct HheaTable *hhea, longHorMetric * hmtx, - int nkern, int *nke, struct KernEntry0 **ke) -{ - fprintf (afm, "StartFontMetrics 3.0\n"); - fprintf (afm, "Comment Automatically generated by ttfps -- do not edit\n"); - printAFMHeader (afm, ht, strings, pt); - printAFMMetrics (afm, ht, nglyphs, postType, gnt, bbox, hhea, hmtx); - printAFMKerning (afm, ht, postType, gnt, nkern, nke, ke); - fprintf (afm, "EndFontMetrics\n"); -} - -void -printAFMHeader (FILE * afm, struct HeadTable *ht, - char **strings, struct PostTable *pt) -{ - fprintf (afm, "FontName %s\n", strings[6] ? strings[6] : "Unknown"); - if (strings[4]) - fprintf (afm, "FullName %s\n", strings[4]); - if (strings[1]) - fprintf (afm, "FamilyName %s\n", strings[1]); - fprintf (afm, "IsFixedPitch %s\n", pt->isFixedPitch ? "true" : "false"); - fprintf (afm, "FontBBox %ld %ld %ld %ld\n", - ht->xMin * 1000L / ht->unitsPerEm, - ht->yMin * 1000L / ht->unitsPerEm, - ht->xMax * 1000L / ht->unitsPerEm, - ht->yMax * 1000L / ht->unitsPerEm); - fprintf (afm, "UnderlinePosition %ld\n", - pt->underlinePosition * 1000L / ht->unitsPerEm); - fprintf (afm, "UnderlineThickness %ld\n", - pt->underlineThickness * 1000L / ht->unitsPerEm); - fprintf (afm, "Version %d.%u\n", ht->fontRevision.mantissa, - ht->fontRevision.fraction); - if (strings[0]) - fprintf (afm, "Notice %s\n", strings[0]); - fprintf (afm, "EncodingScheme AdobeStandardEncoding\n"); - /* fprintf(afm,"CapHeight %d\n"); - fprintf(afm,"XHeight %d\n"); - fprintf(afm,"Ascender %d\n"); - fprintf(afm,"Descender %d\n"); */ -} - -void -printAFMMetrics (FILE * afm, struct HeadTable *ht, - int nglyphs, int postType, struct GlyphName *gnt, - struct Box *bbox, - struct HheaTable *hhea, longHorMetric * hmtx) -{ - int i, j; - char *name; - struct hashtable *table; - char *already_done; - - /* Hash all the character names */ - table = make_hashtable (nglyphs / 3 + 1); - for (i = 0; i < nglyphs; i++) - { - name = NAMEOF (i); - if (name) - puthash (table, name, i); - } - - already_done = mycalloc (nglyphs, sizeof (char)); - - fprintf (afm, "StartCharMetrics %d\n", nglyphs); - /* First, print out the encoded glyphs */ - for (i = 0; i < 256; i++) - { - if (adobeStandardEncoding[i]) - { - j = gethash (table, adobeStandardEncoding[i]); - if (j >= 0) - { - printOneAFMMetric (afm, j, i, adobeStandardEncoding[i], - ht, bbox, hhea, hmtx); - already_done[j] = 1; - } - } - } - /* Now, print out the others */ - for (j = 0; j < nglyphs; j++) - { - if (!already_done[j]) - { - name = NAMEOF (j); - printOneAFMMetric (afm, j, -1, name, ht, bbox, hhea, hmtx); - } - } - fprintf (afm, "EndCharMetrics\n"); -} - -void -printOneAFMMetric (FILE * afm, - int index, int code, char *name, - struct HeadTable *ht, - struct Box *bbox, - struct HheaTable *hhea, longHorMetric * hmtx) -{ - if (name) - { - fprintf (afm, "C %d ;", code); - if (hhea && hmtx) - fprintf (afm, " WX %ld ;", - index < hhea->numberOfHMetrics ? - hmtx[index].advanceWidth * 1000L / ht->unitsPerEm : - hmtx[hhea->numberOfHMetrics - - 1].advanceWidth * 1000L / ht->unitsPerEm); - fprintf (afm, " N %s ;", name); - if (bbox) - fprintf (afm, " B %ld %ld %ld %ld ;", - bbox[index].xMin * 1000L / ht->unitsPerEm, - bbox[index].yMin * 1000L / ht->unitsPerEm, - bbox[index].xMax * 1000L / ht->unitsPerEm, - bbox[index].yMax * 1000L / ht->unitsPerEm); - fprintf (afm, "\n"); - } -} - -void -printAFMKerning (FILE * afm, struct HeadTable *ht, - int postType, struct GlyphName *gnt, - int nkern, int *nke, struct KernEntry0 **ke) -{ - int i, j, n; - - for (n = i = 0; i < nkern; i++) - n += nke[i]; - if (n == 0) - return; - - fprintf (afm, "StartKernData\nStartKernPairs %d\n", n); - - for (i = 0; i < nkern; i++) - for (j = 0; j < nke[i]; j++) - fprintf (afm, "KPX %s %s %ld\n", - NAMEOF (ke[i][j].left), - NAMEOF (ke[i][j].right), - ke[i][j].value * 1000L / ht->unitsPerEm); - fprintf (afm, "EndKernPairs\nEndKernData\n"); -} diff --git a/ttftool/ttfps.c b/ttftool/ttfps.c index 143af5e6a7..88c6cff93f 100644 --- a/ttftool/ttfps.c +++ b/ttftool/ttfps.c @@ -17,7 +17,6 @@ void create_type42 (const char *infile, FILE * out) { int fd, i; - FILE *afm = NULL; struct OffsetTable ot; struct HeadTable *ht; struct PostTable *pt; @@ -117,14 +116,6 @@ create_type42 (const char *infile, FILE * out) fprintf (stderr, "Generating PS file\n"); printPSFont (out, ht, strings, nglyphs, postType, pt, gnt, fd); fclose (out); - if (afm) - { - if (verbosity >= 1) - fprintf (stderr, "Generating AFM file\n"); - printAFM (afm, ht, strings, nglyphs, postType, pt, gnt, - bbox, hhea, hmtx, nkern, nke, ke); - fclose (afm); - } if (verbosity >= 1) fprintf (stderr, "Done.\n"); close (fd); -- 2.39.5