unsigned last;
} Range;
-typedef int bool;
+typedef unsigned char bool;
void usage(void);
int convert_numeric_option(char, int);
" -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");
}
{
unsigned i;
size_t area = 0;
- char *used_glyphs;
+ bool *used_glyphs;
unsigned *used_pixels;
unsigned cx = margin, cy;
unsigned used_h = 0;
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+margin<font->image.h;)