home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / biblioteki / fontlib / fontlibtest.c < prev    next >
C/C++ Source or Header  |  1996-04-08  |  1KB  |  60 lines

  1. //
  2. // FontLibTest.c
  3. // Version 1.0
  4. //
  5. // FontLib ©1996 Henrik Isaksson
  6. // EMail: henriki@pluggnet.se
  7. // All Rights Reserved.
  8. //
  9. // This library is FreeWare.
  10. // If you plan to use any of theese funtions in commercial software,
  11. // ask me first at the address above.
  12. // I can not be held responsible for any damage or loss of data caused
  13. // by this software. Use it at your own risk.
  14. //
  15. // Questions and suggestions to: henriki@pluggnet.se
  16. //
  17.  
  18. #include <exec/types.h>
  19. #include <exec/memory.h>
  20. #include <intuition/intuition.h>
  21.  
  22. #include <clib/diskfont_protos.h>
  23. #include <clib/exec_protos.h>
  24. #include <clib/graphics_protos.h>
  25. #include <clib/intuition_protos.h>
  26.  
  27. #include <string.h>
  28.  
  29. #include "fontlib.h"
  30.  
  31. void main()
  32. {
  33.  struct Window *Wnd=OpenWindowTags(NULL,TAG_DONE);
  34.  FLFont *f;
  35.  int i;
  36.  
  37.  if(Wnd) {
  38.   SETWFONT(Wnd,"times.font",24,0,0);    // Set Window Font to times.font 24
  39.  
  40.   for(i=0;i<100;i++) {
  41.    SETWDRAW(Wnd,1,4,1);            // Set Window DrawMode & Pens to FG=1 BG=4 DrawMode=JAM2
  42.    WTEXT(Wnd,10+i,30+i,"Hejsan!");    // Print the text (Hejsan=Hello)
  43.    Delay(1);                // Delay
  44.    SETWDRAW(Wnd,0,0,1);
  45.    WTEXT(Wnd,10+i,30+i,"Hejsan!");    // Delete the old text.
  46.   }
  47.  
  48.   CloseWindow(Wnd);
  49.  }
  50.  
  51.  f=FL_LoadFont(XEN11);
  52.  
  53.  FL_FreeFont(f);
  54.  
  55.  
  56.  FL_FreeAll();    // Close all fonts that I 'forgot' to close
  57. }
  58.  
  59. // The End!
  60.