fix: use the upcoming libcaca's canvas width and smushing mode features.
This commit is contained in:
parent
f35c90ff3e
commit
7caaf1a742
3 changed files with 10 additions and 15 deletions
|
@ -49,6 +49,9 @@ int init_figlet(context_t *cx)
|
|||
}
|
||||
}
|
||||
|
||||
caca_set_figfont_smush(cx->cv, cx->hmode);
|
||||
caca_set_figfont_width(cx->cv, cx->term_width);
|
||||
|
||||
cx->feed = feed_figlet;
|
||||
cx->flush = flush_figlet;
|
||||
cx->end = end_figlet;
|
||||
|
|
12
src/main.c
12
src/main.c
|
@ -48,7 +48,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
cx->term_width = 80;
|
||||
|
||||
cx->hmode = H_DEFAULT;
|
||||
cx->hmode = "default";
|
||||
|
||||
cx->filters = NULL;
|
||||
cx->nfilters = 0;
|
||||
|
@ -126,19 +126,19 @@ int main(int argc, char *argv[])
|
|||
break;
|
||||
}
|
||||
case 's':
|
||||
cx->hmode = H_DEFAULT;
|
||||
cx->hmode = "default";
|
||||
break;
|
||||
case 'S':
|
||||
cx->hmode = H_SMUSH;
|
||||
cx->hmode = "smush";
|
||||
break;
|
||||
case 'k':
|
||||
cx->hmode = H_KERN;
|
||||
cx->hmode = "kern";
|
||||
break;
|
||||
case 'W':
|
||||
cx->hmode = H_NONE;
|
||||
cx->hmode = "none";
|
||||
break;
|
||||
case 'o':
|
||||
cx->hmode = H_OVERLAP;
|
||||
cx->hmode = "overlap";
|
||||
break;
|
||||
case 'E': /* --export */
|
||||
if(!strcmp(caca_optarg, "list"))
|
||||
|
|
10
src/toilet.h
10
src/toilet.h
|
@ -32,15 +32,7 @@ struct toilet_context
|
|||
int (*end)(struct toilet_context *);
|
||||
|
||||
/* Used by the FIGlet driver */
|
||||
enum { H_DEFAULT, H_KERN, H_SMUSH, H_NONE, H_OVERLAP } hmode;
|
||||
unsigned int hsmushrule;
|
||||
unsigned long int hardblank;
|
||||
unsigned int height, baseline, max_length;
|
||||
int old_layout;
|
||||
unsigned int print_direction, full_layout, codetag_count;
|
||||
unsigned int glyphs;
|
||||
caca_canvas_t *fontcv, *charcv;
|
||||
int *left, *right; /* Unused yet */
|
||||
char const *hmode;
|
||||
unsigned int *lookup;
|
||||
|
||||
/* Render filters */
|
||||
|
|
Loading…
Reference in a new issue