summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2007-02-06 22:53:33 +0000
committerBen Harris <bjh21@bjh21.me.uk>2007-02-06 22:53:33 +0000
commita0476063527f6ccc0874c04d8abdfe8732e75bff (patch)
treeb62507a0d61ef6fd01ff387325e9fe2653f8e969
parent6dd55a73a8c2a5e0f4dcb652bb50b4828194c33d (diff)
downloadhalibut-a0476063527f6ccc0874c04d8abdfe8732e75bff.zip
halibut-a0476063527f6ccc0874c04d8abdfe8732e75bff.tar.gz
halibut-a0476063527f6ccc0874c04d8abdfe8732e75bff.tar.bz2
halibut-a0476063527f6ccc0874c04d8abdfe8732e75bff.tar.xz
Tweak to Tye 42 font generation -- construct the CharStrings dictionary
rather more in PostScript and less in C. [originally from svn r7243]
-rw-r--r--in_sfnt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/in_sfnt.c b/in_sfnt.c
index fe10c46..5b87976 100644
--- a/in_sfnt.c
+++ b/in_sfnt.c
@@ -683,9 +683,10 @@ void sfnt_writeps(font_info const *fi, FILE *ofp) {
}
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);