]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 24 Feb 2005 23:02:16 +0000 (23:02 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 24 Feb 2005 23:02:16 +0000 (23:02 +0000)
flower/memory-stream.cc
ly/engraver-init.ly
ttftool/ps.c
ttftool/ttfps.c

index 845a19885b34655589eb907bf8540402784fbf49..9a9fbd4351829abd466a1639d906ff8480ca2f90 100644 (file)
@@ -10,6 +10,7 @@
 #include <assert.h>
 #include <string.h>
 #include <stdlib.h>
+
 #include "memory-stream.hh"
 
 
index f2df8b518586ac45d6a9a50a82f00e98ca8d73ce..9882f17e37a90780f1e759408c57f8f4622956b3 100644 (file)
@@ -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"
+}
index ccf4a16b7f0e2f7f248e37f50d3db1ab99dee796..3d8e786c74c5148bd8c7415b837dea658f787c5a 100644 (file)
@@ -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");
-}
index 143af5e6a7edf64a70e7f16fcc5d2ef4ea687828..88c6cff93f15d77040fff825d22eb10c6e74478c 100644 (file)
@@ -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);