X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=ttf2png.c;h=0c1c09a490f0dd675c000496b2f7fd3cc6159e5c;hb=0846d7665792d25e673ae51b56b691f58f7d0679;hp=f8db322032d725f88b646b329b7cf42753c44fc4;hpb=6c8c1afdbad505c04a251da05499658b7cc65825;p=ttf2png.git diff --git a/ttf2png.c b/ttf2png.c index f8db322..0c1c09a 100644 --- a/ttf2png.c +++ b/ttf2png.c @@ -68,7 +68,7 @@ typedef struct sRange unsigned last; } Range; -typedef int bool; +typedef unsigned char bool; void usage(void); int convert_numeric_option(char, int); @@ -309,8 +309,9 @@ void usage(void) " -p Pack the glyphs tightly instead of in a grid\n" " -m Margin around image edges (packed mode only) [0]\n" " -n Padding between glyphs (packed mode only) [1]\n" - " -g Allow non-power-of-two result\n" - " -f Create a distance field texture\n" + " -g Allow non-power-of-two result\n"); + printf(" -f Create a distance field texture\n" + " -b Specify distance field border zone width\n" " -d File name for writing glyph definitions\n" " -h Print this message\n"); } @@ -878,7 +879,7 @@ int render_packed(Font *font, unsigned margin, unsigned padding) { unsigned i; size_t area = 0; - char *used_glyphs; + bool *used_glyphs; unsigned *used_pixels; unsigned cx = margin, cy; unsigned used_h = 0; @@ -917,7 +918,7 @@ int render_packed(Font *font, unsigned margin, unsigned padding) memset(font->image.data, 0, font->image.w*font->image.h); used_pixels = (unsigned *)malloc(font->image.w*sizeof(unsigned)); memset(used_pixels, 0, font->image.w*sizeof(unsigned)); - used_glyphs = (char *)malloc(font->n_glyphs); + used_glyphs = (bool *)malloc(font->n_glyphs); memset(used_glyphs, 0, font->n_glyphs); for(cy=margin; cy+marginimage.h;)