home *** CD-ROM | disk | FTP | other *** search
- /*
- * FONT.C - PGL Font demo program
- */
- #include <stdlib.h>
- #include <stdio.h>
- #include "pgl.h"
-
- void textfonts ( void );
-
- main()
- {
- int err=0;
-
- pgInitDrw( "font.plt", 2000, 2000, &err );
- if( err != 0 )
- {
- printf( "ERROR IN INITDRW ROUTINE" );
- exit( 1 );
- }
- pgSetColor( 1 );
-
- textfonts();
-
- pgEndDrw();
- }
- /*
- *****************************************************************************
- *** FUNCTION TEXTFONTS ***
- *****************************************************************************
- *** ***
- *** This function tests the various font sets. ***
- *** ***
- *****************************************************************************
- *****************************************************************************
- */
- void textfonts()
-
- {
- int midx;
-
- midx = pgGetMaxX()/2;
- pgSetTextScaling( 5, 1, 5, 1 );
- pgSetTextJustify( pgCENTER, pgBOTTOM );
- pgDrawTextXY( midx, 250, "Default Font Set (pgSMALL)" );
-
- pgSetTextStyle( pgSIMPLEX );
- pgDrawTextXY( midx, 500, "Simplex Font Set" );
-
- pgSetTextStyle( pgDUPLEX );
- pgDrawTextXY( midx, 750, "Duplex Font Set" );
-
- pgSetTextStyle( pgTRIPLEX );
- pgDrawTextXY( midx, 1000, "Triplex Font Set" );
-
- pgSetTextStyle( pgGOTHIC );
- pgDrawTextXY( midx, 1250, "Gothic Font Set" );
-
- pgSetTextStyle( pgSCRIPT );
- pgDrawTextXY( midx, 1500, "Script Font Set" );
-
- pgSetTextStyle( pgSDUPLEX );
- pgDrawTextXY( midx, 1750, "Script Duplex Font Set" );
- }