# HG changeset patch # User John Tsiombikas # Date 1407384161 -10800 # Node ID 6089fcfbd5ea13b7c48545f252feb0ce57248386 # Parent 4224452b9c867355d405b211a50b321b1d8a82f1 improvements in font2glyphmap diff -r 4224452b9c86 -r 6089fcfbd5ea tools/font2glyphmap/src/font2glyphmap.c --- a/tools/font2glyphmap/src/font2glyphmap.c Sun Jun 08 06:40:30 2014 +0300 +++ b/tools/font2glyphmap/src/font2glyphmap.c Thu Aug 07 07:02:41 2014 +0300 @@ -4,17 +4,19 @@ #include "drawtext.h" #define SUFFIX "glyphmap" +#define DEF_SIZE 12 struct coderange { int start, end; struct coderange *next; }; +void print_usage(const char *argv0); int font2glyphmap(struct dtx_font *font, const char *infname, const char *outfname, int size, int rstart, int rend); int main(int argc, char **argv) { - int i, font_size = 12, suffix_len = strlen(SUFFIX); + int i, font_size = DEF_SIZE, suffix_len = strlen(SUFFIX); struct coderange *clist = 0; for(i=1; i [ ... ]\n", argv0); + printf("options:\n"); + printf(" -size : point size (default: %d)\n", DEF_SIZE); + printf(" -range -: unicode range (default: ascii)\n"); + printf(" -help: print usage information and exit\n"); +} + int font2glyphmap(struct dtx_font *font, const char *infname, const char *outfname, int size, int rstart, int rend) { struct dtx_glyphmap *gmap;