char autohinter = 0;
char seq = 0;
char alpha = 0;
+ char invert = 0;
char pack = 0;
FT_Library freetype;
return 1;
}
- while((i = getopt(argc, argv, "r:s:l:c:o:atvh?ed:p")) != -1)
+ while((i = getopt(argc, argv, "r:s:l:c:o:atvh?ed:pi")) != -1)
{
char *ptr;
int temp;
case 'p':
pack = 1;
break;
+ case 'i':
+ invert = 1;
+ break;
}
}
if(!strcmp(out_fn, "-"))
render_packed(&font);
else
render_grid(&font, cellw, cellh, cpl, seq);
+ if(invert)
+ {
+ for(i=0; i<font.image.w*font.image.h; ++i)
+ font.image.data[i] = 255-font.image.data[i];
+ }
save_png(out_fn, &font.image, alpha);
if(def_fn)
save_defs(def_fn, &font);
" -o Output file name (or - for stdout) [font.png]\n"
" -a Force autohinter\n"
" -t Render font to alpha channel\n"
+ " -i Invert colors of the glyphs\n"
" -v Increase the level of verbosity\n"
" -e Use cells in sequence, rather than by code\n"
" -p Pack the glyphs tightly instead of in a grid\n"