*** TextFmt.c++.orig Wed Nov 27 00:20:44 1996 --- TextFmt.c++ Thu Feb 13 02:28:40 1997 *************** *** 1210,1216 **** fputc(c, fd); } else fprintf(fd, "\\%03o", c); ! hm += widths[c]; } while (--len); fprintf(fd, ")%s ", (const char*) showproc); } --- 1210,1216 ---- fputc(c, fd); } else fprintf(fd, "\\%03o", c); ! hm += widths[(unsigned) c]; // Leif Erlingsson } while (--len); fprintf(fd, ")%s ", (const char*) showproc); } *************** *** 1228,1234 **** { TextCoord w = 0; while (*cp) ! w += widths[*cp++]; return w; } --- 1228,1234 ---- { TextCoord w = 0; while (*cp) ! w += widths[(unsigned) (*cp++ & 0xff)]; // Leif Erlingsson return w; } *************** *** 1295,1300 **** --- 1295,1307 ---- "%s: No glyph metric table located; using fixed widths", (const char*) file); fclose(fp); + /* + * Next line added by Leif Erlingsson because + * otherwise, if the metrics-file has no glyph metric table + * and useISO8859 == False, the FixedMetrics will be all 0's! + * (I don't know if this does or does not cause any problem.) + */ + loadFixedMetrics(625*ps/1000L); // NB: use fixed width metrics return (FALSE); } lineno++; *************** *** 1311,1316 **** --- 1318,1333 ---- } if (ix == -1) // end of unencoded glyphs break; + /* + * Next if-clause added by Leif Erlingsson because + * experience has shown most glyph metric table's to be useless + * for obtaining character widths of iso8859-1 characters > 127. + * The Adobe Helvetica-Oblique metrics-file created Tue Apr 1 + * 12:54:09 PST 1986 caused bad spacing for eight-bit iso-8859-1 + * characters, for example. + */ + if (ix > 127) + w = 625; // distrust metrics-file for char > 127 if (ix < NCHARS) widths[ix] = w*ps/1000L; }