You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

50 lines
1.0 KiB

  1. /*
  2. * font libcucul font test program
  3. * Copyright (c) 2006 Sam Hocevar <sam@zoy.org>
  4. * All Rights Reserved
  5. *
  6. * $Id$
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the Do What The Fuck You Want To
  10. * Public License, Version 2, as published by Sam Hocevar. See
  11. * http://sam.zoy.org/wtfpl/COPYING for more details.
  12. */
  13. #include "config.h"
  14. #if defined(HAVE_INTTYPES_H)
  15. # include <inttypes.h>
  16. #else
  17. typedef unsigned char uint8_t;
  18. typedef unsigned short uint16_t;
  19. typedef unsigned int uint32_t;
  20. #endif
  21. #include <stdio.h>
  22. #include <stdlib.h>
  23. #include <string.h>
  24. #include "cucul.h"
  25. extern uint8_t font_monospace9[];
  26. int main(int argc, char *argv[])
  27. {
  28. cucul_t *qq;
  29. struct cucul_font *f;
  30. qq = cucul_create(5, 2);
  31. cucul_putstr(qq, 0, 0, "ABcde");
  32. cucul_putstr(qq, 0, 1, "&$âøÿ");
  33. f = cucul_load_font(font_monospace9, 700000);
  34. cucul_render_canvas(qq, f);
  35. cucul_free_font(f);
  36. cucul_free(qq);
  37. return 0;
  38. }