home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / iffconverter / diskfonts.c < prev    next >
C/C++ Source or Header  |  1997-01-07  |  1KB  |  61 lines

  1. /*
  2. **     $VER: DiskFonts.c 0.01 (14-06-95)
  3. **
  4. **     Author:  Gerben Venekamp
  5. **     Updates: 14-06-95  Version 0.01      Intial module
  6. **
  7. **  DiskFonts.c contains the function to manage the diskfonts. It
  8. **  opens and closes fonts and maintains the information necessary
  9. **  for IFFConverter.
  10. **
  11. */
  12.  
  13. #include <exec/types.h>
  14. #include <proto/diskfont.h>
  15. #include <proto/graphics.h>
  16.  
  17. #include "IFFConverter.h"
  18.  
  19. // Defining variables
  20. APTR SystemFont = NULL;
  21.  
  22. struct TextAttr System_8 = {
  23.    (STRPTR)"system.font",    // ta_Name
  24.    8,                        // ta_YSize
  25.    FS_NORMAL,                // ta_Style
  26.    0x0                       // ta_Flags
  27. };
  28.  
  29. // Defining prototpyes
  30. void GetDiskFonts(void);
  31. void CloseFonts(void);
  32.  
  33. /*
  34. **  GetDiskFonts()
  35. **
  36. **     Loads one or more diskfonts onto RAM. Loaded fonts are:
  37. **        · System.font
  38. **
  39. **  pre:  None.
  40. **  post: None.
  41. */
  42. void GetDiskFonts()
  43. {
  44.    SystemFont = OpenDiskFont(&System_8);
  45. }
  46.  
  47.  
  48. /*
  49. **  CloseFonts()
  50. **
  51. **     Closes all opened fonts for you. Closed fonts are:
  52. **        ·System
  53. **
  54. **  pre:  None.
  55. **  post: None.
  56. */
  57. void CloseFonts()
  58. {
  59.    if(SystemFont) CloseFont(SystemFont);
  60. }
  61.