# HG changeset patch # User arpi # Date 997387665 0 # Node ID 529a65694e407aae760ded2db9781ca4d7854ac9 # Parent e5e6c26c1aa10837a727a35ece196b1316c4d4f7 more optimization diff -r e5e6c26c1aa1 -r 529a65694e40 TOOLS/subfont-c/subfont.c --- a/TOOLS/subfont-c/subfont.c Thu Aug 09 18:40:06 2001 +0000 +++ b/TOOLS/subfont-c/subfont.c Thu Aug 09 20:07:45 2001 +0000 @@ -55,6 +55,7 @@ unsigned char *buffer; +unsigned char *ebuffer; // temporary buffer for alphamap creation (edges) unsigned char *abuffer; int width, height; static FT_ULong ustring[256]; @@ -252,6 +253,7 @@ eprintf("bitmap size: %ix%i\n", width, height); buffer = (unsigned char*)malloc(width*height); + ebuffer = (unsigned char*)malloc(width*height); abuffer = (unsigned char*)malloc(width*height); if (buffer==NULL || abuffer==NULL) ERROR("malloc failed.",NULL); @@ -358,15 +360,13 @@ /* This is not a gaussian blur! */ /* And is very slow */ - for (y = 0; y0 && y+my0 && ax255?255:p)*m[mx+r+(my+r)*w]; - } - - } + ebuffer[ax+ay]=(p>255)?255:p; + } +// printf("\n"); + } + + // PASS-2 : blur + for (y = 0; y0 && ay0 && x+mx255) max=255; @@ -393,6 +407,7 @@ } // printf("\n"); } + free(m); }