Insert a missing (though strictly unnecessary) newline.
[sgt/halibut] / in_sfnt.c
index fe10c46..a9108e8 100644 (file)
--- a/in_sfnt.c
+++ b/in_sfnt.c
@@ -679,13 +679,14 @@ void sfnt_writeps(font_info const *fi, FILE *ofp) {
                (double)sf->head.yMax / sf->head.unitsPerEm);
     } else {
        /* Non-sensible font. */
-       fprintf(ofp, "/FontBBox [0 0 0 0] readonly def");
+       fprintf(ofp, "/FontBBox [0 0 0 0] readonly def\n");
     }
     fprintf(ofp, "/PaintType 0 def\n");
     fprintf(ofp, "/CharStrings %u dict dup begin\n", sf->nglyphs);
+    fprintf(ofp, "0 1 %u{currentfile token pop exch def}bind for\n",
+       sf->nglyphs - 1);
     for (i = 0; i < sf->nglyphs; i++)
-       fprintf(ofp, "/%s %u def\n",
-               glyph_extern(sfnt_indextoglyph(sf, i)), i);
+       fprintf(ofp, "/%s\n", glyph_extern(sfnt_indextoglyph(sf, i)));
     fprintf(ofp, "end readonly def\n");
     fprintf(ofp, "/sfnts [<");
     breaks = snewn(sf->osd.numTables + sf->nglyphs, size_t);