瀏覽代碼

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

pull/1/head
Sam Hocevar sam 11 年之前
父節點
當前提交
7caaf1a742
共有 3 個檔案被更改,包括 10 行新增15 行删除
  1. +3
    -0
      src/figlet.c
  2. +6
    -6
      src/main.c
  3. +1
    -9
      src/toilet.h

+ 3
- 0
src/figlet.c 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存