Changeset 4345


Ignore:
Timestamp:
Feb 9, 2010, 12:34:05 AM (8 years ago)
Author:
Sam Hocevar
Message:

Search for missing fonts in the current directory (Fixes #40) and display
an error message in case of failure.

Location:
toilet/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • toilet/trunk/doc/toilet.1.in

    r4134 r4345  
    5757files stored in the
    5858.B @datarootdir@/figlet
     59directory. Fonts are looked first in the font directory, then in the current
    5960directory. There is also a special built-in font called
    6061.I term
  • toilet/trunk/src/figlet.c

    r4138 r4345  
    4343    snprintf(path, 2047, "%s/%s", cx->dir, cx->font);
    4444    if(caca_canvas_set_figfont(cx->cv, path))
    45         return -1;
     45    {
     46        snprintf(path, 2047, "./%s", cx->font);
     47        if(caca_canvas_set_figfont(cx->cv, path))
     48        {
     49            fprintf(stderr, "error: could not load font %s\n", cx->font);
     50            return -1;
     51        }
     52    }
    4653
    4754    cx->feed = feed_figlet;
Note: See TracChangeset for help on using the changeset viewer.