*** ttf2bdf.c.orig Mon Jan 28 16:21:20 2002 --- ttf2bdf.c Wed Dec 26 17:12:04 2001 *************** *** 691,697 **** raster.flow = TT_Flow_Up; raster.width = maxx; raster.rows = maxy; ! raster.cols = (maxx + 7) >> 3; raster.size = raster.cols * raster.rows; raster.bitmap = (void *) malloc(raster.size); --- 691,697 ---- raster.flow = TT_Flow_Up; raster.width = maxx; raster.rows = maxy; ! raster.cols = (raster.width + 3) & ~3 /*(maxx + 7) >> 3 */; raster.size = raster.cols * raster.rows; raster.bitmap = (void *) malloc(raster.size); *************** *** 758,764 **** /* * If the bitmap cannot be generated, simply continue. */ ! if (TT_Get_Glyph_Bitmap(glyph, &raster, xoff, yoff)) continue; /* --- 758,764 ---- /* * If the bitmap cannot be generated, simply continue. */ ! if (TT_Get_Glyph_Pixmap(glyph, &raster, xoff, yoff)) continue; /* *************** *** 778,785 **** bmap = (unsigned char *) raster.bitmap; for (miny = 0; miny < raster.rows; miny++) { for (minx = 0; minx < raster.width; minx++) { ! if (bmap[(miny * raster.cols) + (minx >> 3)] & ! (0x80 >> (minx & 7))) { if (minx < sx) sx = minx; if (minx > ex) --- 778,784 ---- bmap = (unsigned char *) raster.bitmap; for (miny = 0; miny < raster.rows; miny++) { for (minx = 0; minx < raster.width; minx++) { ! if (bmap[miny * raster.cols + minx] ) { if (minx < sx) sx = minx; if (minx > ex) *************** *** 851,873 **** */ for (miny = sy; eof != EOF && miny >= ey; miny--) { for (idx = 0, minx = sx; eof != EOF && minx <= ex; minx++) { ! if (minx > sx && ((minx - sx) & 7) == 0) { ! /* ! * Print the next byte. ! */ ! eof = fprintf(tmp, "%02lX", idx & 0xff); ! idx = 0; ! } ! if (bmap[(miny * raster.cols) + (minx >> 3)] & ! (0x80 >> (minx & 7))) ! idx |= 0x80 >> ((minx - sx) & 7); } ! if (eof != EOF) ! /* ! * Because of the structure of the loop, the last byte should ! * always be printed. ! */ ! fprintf(tmp, "%02lX\n", idx & 0xff); } if (eof != EOF) fprintf(tmp, "ENDCHAR\n"); --- 850,858 ---- */ for (miny = sy; eof != EOF && miny >= ey; miny--) { for (idx = 0, minx = sx; eof != EOF && minx <= ex; minx++) { ! fprintf(tmp, "%02X", bmap[miny*raster.cols+minx]); } ! fprintf( tmp, "\n"); } if (eof != EOF) fprintf(tmp, "ENDCHAR\n"); *************** *** 955,960 **** --- 940,946 ---- fprintf(out, "FONTBOUNDINGBOX %hd %hd %hd %hd\n", bbx.maxrb - bbx.minlb, bbx.maxas + bbx.maxds, bbx.minlb, -bbx.maxds); + fprintf(out, "SMOOTHING 4\n"); /* * Print the properties.