- totfont += dofont(fname[i]);
- write(fdout, &font, sizeof(struct font));
+ /*
+ * Get fontinfo ...
+ */
+ dofont(fname[i]);
+ /*
+ * ... and force space in troff allocated for the
+ * biggest font possible and limited by makedev
+ * to be loaded in troff by faking font.nwfont
+ * (and bumping up the size of DESC.out) by
+ * recalculating the padded out fontsize (v)
+ * jna
+ */
+ font.nwfont = FSIZE;
+ v = sizeof(struct Font) + 3 * FSIZE + dev.nchtab + 128-32;
+ /*
+ * This is not correct, we can still
+ * have too less space if the default
+ * mounted fonts does not contain a
+ * fonttab, but I don't want to change
+ * troff on the moment...
+ */
+ if(font.fonttab == 1)
+ v += FSIZE * sizeof( short );
+ totfont += v;
+ write(fdout, &font, sizeof(struct Font));