Ignore:
Timestamp:
Apr 13, 2006, 6:10:16 PM (15 years ago)
Author:
Sam Hocevar
Message:
  • Implemented cucul_get_font_list() to retrieve the list of builtin fonts.
  • Fixed font selection through cucul_font_load().
  • Added a bigger 10x19 bold font.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/test/font.c

    r760 r763  
    3434    unsigned char *buf;
    3535    unsigned int x, y, w, h;
     36    char const * const * fonts;
    3637
    3738    /* Create a canvas */
     
    4445
    4546    /* Load a libcucul internal font */
    46     f = cucul_load_font("Monospace 9", 0);
     47    fonts = cucul_get_font_list();
     48    if(fonts[0] == NULL)
     49    {
     50        fprintf(stderr, "error: libcucul was compiled without any fonts\n");
     51        return -1;
     52    }
     53    f = cucul_load_font(fonts[0], 0);
    4754
    4855    /* Create our bitmap buffer (32-bit ARGB) */
Note: See TracChangeset for help on using the changeset viewer.