render_grid(&font, cellw, cellh, cpl, seq);
if(invert)
{
render_grid(&font, cellw, cellh, cpl, seq);
if(invert)
{
font.image.data[i] = 255-font.image.data[i];
}
save_png(out_fn, &font.image, alpha);
if(def_fn)
save_defs(def_fn, &font);
font.image.data[i] = 255-font.image.data[i];
}
save_png(out_fn, &font.image, alpha);
if(def_fn)
save_defs(def_fn, &font);
{
printf("ttf2png - True Type Font to PNG converter\n"
"Copyright (c) 2004-2008 Mikko Rasa, Mikkosoft Productions\n"
{
printf("ttf2png - True Type Font to PNG converter\n"
"Copyright (c) 2004-2008 Mikko Rasa, Mikkosoft Productions\n"
- "Distributed under the GNU General Public License\n\n"
- "Usage: ttf2png [options] <TTF file>\n\n"
- "Accepted options (default values in [brackets])\n"
+ "Distributed under the GNU General Public License\n\n");
+
+ printf("Usage: ttf2png [options] <TTF file>\n\n");
+
+ printf("Accepted options (default values in [brackets])\n"
" -r Range of characters to convert [0,255]\n"
" -s Font size to use, in pixels [10]\n"
" -l Number of characters to put in one line [auto]\n"
" -c Character cell size, in pixels [auto]\n"
" -r Range of characters to convert [0,255]\n"
" -s Font size to use, in pixels [10]\n"
" -l Number of characters to put in one line [auto]\n"
" -c Character cell size, in pixels [auto]\n"
" -t Render glyphs to alpha channel\n"
" -i Invert colors of the glyphs\n"
" -v Increase the level of verbosity\n"
" -t Render glyphs to alpha channel\n"
" -i Invert colors of the glyphs\n"
" -v Increase the level of verbosity\n"
printf("Max size: %u x %u\n", maxw, maxh);
printf("Y range: [%d %d]\n", bot, top);
printf("Cell size: %u x %u\n", cellw, cellh);
printf("Max size: %u x %u\n", maxw, maxh);
printf("Y range: [%d %d]\n", bot, top);
printf("Cell size: %u x %u\n", cellw, cellh);
png_set_rows(pngs, pngi, rows);
png_write_png(pngs, pngi, PNG_TRANSFORM_IDENTITY, NULL);
png_destroy_write_struct(&pngs, &pngi);
png_set_rows(pngs, pngi, rows);
png_write_png(pngs, pngi, PNG_TRANSFORM_IDENTITY, NULL);
png_destroy_write_struct(&pngs, &pngi);