source: libcaca/trunk/examples/figfont.c @ 2110

Last change on this file since 2110 was 2110, checked in by Sam Hocevar, 12 years ago
  • Implemented cucul_canvas_set_figfont() from TOIlet’s open_font().
File size: 969 bytes
Line 
1/*
2 *  figfont       libcucul FIGfont test program
3 *  Copyright (c) 2007 Sam Hocevar <sam@zoy.org>
4 *                All Rights Reserved
5 *
6 *  $Id$
7 *
8 *  This program is free software. It comes without any warranty, to
9 *  the extent permitted by applicable law. You can redistribute it
10 *  and/or modify it under the terms of the Do What The Fuck You Want
11 *  To Public License, Version 2, as published by Sam Hocevar. See
12 *  http://sam.zoy.org/wtfpl/COPYING for more details.
13 */
14
15#include "config.h"
16#include "common.h"
17
18#if !defined(__KERNEL__)
19#   include <stdio.h>
20#endif
21
22#include "cucul.h"
23
24int main(int argc, char *argv[])
25{
26    cucul_canvas_t *cv;
27
28    if(argc < 2)
29    {
30        fprintf(stderr, "Too few arguments\n");
31        return -1;
32    }
33
34    cv = cucul_create_canvas(0, 0);
35    if(cucul_canvas_set_figfont(cv, argv[1]))
36    {
37        fprintf(stderr, "Could not open font\n");
38        return -1;
39    }
40
41    cucul_free_canvas(cv);
42
43    return 0;
44}
45
Note: See TracBrowser for help on using the repository browser.