mirror of
https://bjh21.me.uk/bedstead/.git
synced 2026-07-10 05:53:05 -04:00
Put minimal DSC comments into glyph complement PostScript.
This commit is contained in:
parent
bbcf177b4b
commit
dfcf8b3207
13
bedstead.c
13
bedstead.c
@ -2142,12 +2142,15 @@ glyph_complement()
|
||||
int i;
|
||||
int const nrow = 20, ncol=12;
|
||||
int const nglyphs = sizeof(glyphs) / sizeof(glyphs[0]);
|
||||
int npages = 0;
|
||||
struct glyph const *sorted[nglyphs], *g;
|
||||
|
||||
for (i = 0; i < nglyphs; i++)
|
||||
sorted[i] = &glyphs[i];
|
||||
qsort(sorted, nglyphs, sizeof(sorted[0]), &byunicode);
|
||||
printf("%%!\n");
|
||||
printf("%%!PS-Adobe\n");
|
||||
printf("%%%%Creator: bedstead\n");
|
||||
printf("%%%%Title: Bedstead Glyph Complement\n");
|
||||
printf("/xfont /Bedstead findfont 20 scalefont def\n");
|
||||
printf("/lfont /Bedstead findfont 4 scalefont def\n");
|
||||
printf("/str 50 string def\n");
|
||||
@ -2166,7 +2169,12 @@ glyph_complement()
|
||||
printf(" 0 0 moveto 0 40 lineto 40 40 lineto 40 0 lineto closepath\n");
|
||||
printf(" 1 setlinewidth stroke\n");
|
||||
printf("} def\n");
|
||||
printf("%%%%EndProlog\n");
|
||||
for (i = 0; i < nglyphs; i++) {
|
||||
if (i % (nrow*ncol) == 0) {
|
||||
++npages;
|
||||
printf("%%%%Page: %d %d\n", npages, npages);
|
||||
}
|
||||
g = sorted[i];
|
||||
printf("gsave %d %d translate 0 0 moveto ",
|
||||
20 + (((i%(nrow*ncol)/nrow) * 40)),
|
||||
@ -2180,8 +2188,9 @@ glyph_complement()
|
||||
else
|
||||
printf("/uni%04X ", g->unicode);
|
||||
printf("exemplify grestore\n");
|
||||
if (i % (nrow*ncol) == (nrow*ncol)-1)
|
||||
if (i % (nrow*ncol) == (nrow*ncol)-1)
|
||||
printf("showpage\n");
|
||||
}
|
||||
printf("showpage\n");
|
||||
printf("%%%%EOF\n");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user