Parcourir la source

fix: use the upcoming libcaca's canvas width and smushing mode features.

pull/1/head
Sam Hocevar sam il y a 11 ans
Parent
révision
7caaf1a742
3 fichiers modifiés avec 10 ajouts et 15 suppressions
  1. +3
    -0
      src/figlet.c
  2. +6
    -6
      src/main.c
  3. +1
    -9
      src/toilet.h

+ 3
- 0
src/figlet.c Voir le fichier

@@ -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;


+ 6
- 6
src/main.c Voir le fichier

@@ -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"))


+ 1
- 9
src/toilet.h Voir le fichier

@@ -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 */


Chargement…
Annuler
Enregistrer