home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / basic / PGL.ZIP / PGLFS.ZIP / FONT.FOR < prev    next >
Encoding:
Text File  |  1992-01-20  |  1.6 KB  |  60 lines

  1. C*****************************************************************************
  2. C  FONT.FOR
  3. C
  4. C  This sample program demonstrates PGL Fonts.
  5. C****************************************************************************
  6.       include   "pgl.for"
  7.       integer*2  ierr
  8. C    
  9. C    Open A Drawing File.
  10. C    
  11.     call pgInitDrw("FONT.PLT"//CHAR(0), 2000, 2000, ierr) 
  12.       if( ierr .ne. 0)then
  13.          print *, 'Error opening drawing file!'
  14.          stop
  15.       endif
  16.  
  17.       call pgSetColor( 1 )
  18. C
  19.       call textfonts()
  20. C
  21. C     Close The Drawing File.
  22. C    
  23.       call pgEndDrw() 
  24. C
  25.       END
  26. C
  27. C
  28. C
  29.       subroutine textfonts()
  30.       include   "pgl.for"
  31.       integer*2 midx
  32.  
  33.       midx = pgGetMaxX() / 2
  34.  
  35.       call pgSetTextScaling( 5, 1, 5, 1 ) 
  36.       call pgSetTextJustify( pgCENTER, pgBOTTOM ) 
  37.       call pgDrawTextXY( midx, 250, "Default Font Set"//
  38.      +        "(pgSMALL)"//CHAR(0) ) 
  39.  
  40.       call pgSetTextStyle( pgSIMPLEX ) 
  41.       call pgDrawTextXY( midx, 500, "Simplex Font Set"//CHAR(0)) 
  42.  
  43.       call pgSetTextStyle( pgDUPLEX ) 
  44.       call pgDrawTextXY( midx, 750, "Duplex Font Set"//CHAR(0)) 
  45.  
  46.       call pgSetTextStyle( pgTRIPLEX ) 
  47.       call pgDrawTextXY( midx, 1000, "Triplex Font Set"//CHAR(0)) 
  48.  
  49.       call pgSetTextStyle( pgGOTHIC ) 
  50.       call pgDrawTextXY( midx, 1250, "Gothic Font Set"//CHAR(0)) 
  51.  
  52.       call pgSetTextStyle( pgSCRIPT ) 
  53.       call pgDrawTextXY( midx, 1500, "Script Font Set"//CHAR(0) ) 
  54.  
  55.       call pgSetTextStyle( pgSDUPLEX ) 
  56.       call pgDrawTextXY( midx, 1750, "Script Duplex Font Set"//CHAR(0)) 
  57.  
  58.       RETURN
  59.       END
  60.