[Xcircuit-dev] Two problems with the EPS output
Brought to you by:
rtedwards
From: Georg D. <geo...@in...> - 2006-03-30 12:21:31
|
Hello *, I think that I've encountered two problems with the EPS files generated by xcircuit when I include these files into LaTeX. The first problem has something to do with the DSC comments (like %%Page). It seems that they interfere with the DSC comments of the document in which they are included. The result is that any tool relaying on the comments (like gv, pstops) fails. A workaround that works for me is to use the flag -K (Pull comments from inclusions) while calling dvips. Of course, it would be nice if including xcircuit files would work in every case. The second problem is the %%DocumentNeededResources line. dvips gives some warnings like: dvips: Font font used in file figure.eps is not in the mapping file. As far as I've seen, the generated lines are not strictly conforming to the DSC standards. This has the following example: %%DocumentNeededResources: font Times-Roman Palatino-Bold %%+ font Helvetica Helvetica-Bold NewCenturySchoolbook-Italic The main difference is that there is only one "font" keyword in each line, while xcircuit generates a "font" keyword in front of each font it uses. This is done in files.c, around line 4300. A possible fix would look like: --- files.c~ 2006-03-28 23:42:46.000000000 +0200 +++ files.c 2006-03-30 14:12:31.669770000 +0200 @@ -4294,8 +4294,8 @@ fprintf(ps, "%%%%BoundingBox: 0 0 612 792\n"); /* letter default */ for (i = 0; i <= fontcount; i++) fontsused[i] = 0; - fprintf(ps, "%%%%DocumentNeededResources: "); - stcount = 27; + fprintf(ps, "%%%%DocumentNeededResources: font "); + stcount = 32; /* find all of the fonts used in this document */ /* log all fonts which are native PostScript */ @@ -4309,12 +4309,12 @@ for (i = 0; i <= fontcount; i++) { if (fontsused[i] & 0x8000) if ((fonts[i].flags & 0x8018) == 0x0) { - stcount += strlen(fonts[i].psname) + 6; + stcount += strlen(fonts[i].psname) + 1; if (stcount > OUTPUTWIDTH) { - stcount = strlen(fonts[i].psname) + 6; - fprintf(ps, "\n%%%%+ "); + stcount = strlen(fonts[i].psname) + 11; + fprintf(ps, "\n%%%%+ font "); } - fprintf(ps, "font %s ", fonts[i].psname); + fprintf(ps, "%s ", fonts[i].psname); } } Best wishes, Georg |