From caada7c5e05d789bde96929491f6fa2cfacac6fc Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Tue, 2 Mar 2010 12:12:34 -0800 Subject: [PATCH] made pdf2pdf clean up after itself --- lib/devices/pdf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/devices/pdf.c b/lib/devices/pdf.c index b96cda3..1e0d6a8 100644 --- a/lib/devices/pdf.c +++ b/lib/devices/pdf.c @@ -393,7 +393,7 @@ void pdf_addfont(gfxdevice_t*dev, gfxfont_t*font) font->unicode2glyph = 0; gfxfont_save(font, filename); font->id=old_id; - + #ifdef RUN_TTX /* for testing the generated fonts: run everything through ttx (fonttools) */ char cmd[256]; @@ -405,13 +405,15 @@ void pdf_addfont(gfxdevice_t*dev, gfxfont_t*font) sprintf(cmd, "rm -f test.ttx");system(cmd); #endif - int l = strlen(font->id); + int l = strlen(fontname); for(t=0;tp, fontname2, l*2, "host", "embedding=true"); i->fontlist = gfxfontlist_addfont2(i->fontlist, font, (void*)(ptroff_t)fontid); + unlink(filename); } } } -- 1.7.10.4