home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Hack-Phreak Scene Programs
/
cleanhpvac.zip
/
cleanhpvac
/
FNTPAK32.ZIP
/
BASIC.EXE
/
DEMO_GFX.BAS
next >
Wrap
BASIC Source File
|
1995-08-16
|
3KB
|
100 lines
DEFINT A-Z
'$INCLUDE: 'Font_Pak.Inc' '... For QB/PDS/VB-DOS
'======================================================== PowerBasic Users
''$INCLUDE "Font_Pak.Inc" '... PB users, UN-REM these lines
''$Link "SCRIPT1.OBJ" '... ALL users -- a callable font
''$Link "FontPakP.OBJ" '... SHAREWARE users
''$Link "GFX_Font.OBJ" '... REGISTERED users
''$Link "Fonts.OBJ" ' " "
'======================================================== PowerBasic Users
'============================================================ Demo_GFX.Bas
' A Font Pak Demonstration Copyright 1991-1994 Rob W. Smetana
'
' Demonstrates using DEFAULT graphics mode fonts.
'
' NOTE: If you run this on an EGA, calling GFXFont16 will give you the
' 8x14 font not the 8x16 (since EGAs have no 8x16). Just ignore
' the note saying you're looking at an 8x16 <g>.
'
' Requires: - Ega or Vga monitor (we won't check).
'
' - Font_Pak.LIB (QB/PDS/VB-DOS) -or- Font_Pak.PBL (PowerBasic)
'
'============================================================ Demo_GFX.Bas
DECLARE SUB GFXScript1 ()
COLOR 7, 1: CLS
CALL fpInitialize: CLS '=== SHAREWARE versions ONLY
WhichFont$ = " " '...use later for labels
PRINT " Demonstrates CALLing fonts in Graphics Modes. "
PRINT " These are the same fonts you can use in text mode."
PRINT : PRINT
PRINT " Press a key and we'll demonstrate calling GFXFont# (where # = 8, 14 or 16)."
d$ = INPUT$(1)
SCREEN 9
FOR Which = 1 TO 3 '...show all 3 VGA default fonts
SELECT CASE Which
CASE 1: CALL GFXFont08: LSET WhichFont$ = "Default 8x8"
CASE 2: CALL GFXFont14: LSET WhichFont$ = "Default 8x14"
CASE 3: CALL GFXFont16: LSET WhichFont$ = "Default 8x16"
END SELECT
GOSUB DisplayIt
NEXT
SCREEN 0
PRINT "Now press a key to see : : :"
PRINT
PRINT "1. How you can easily mix fonts -- even on the same line."
PRINT
PRINT "2. What happens when you print 2 different size fonts (8 and 16) side by side."
d$ = INPUT$(1)
SCREEN 9
FOR x = 1 TO 15
CALL GFXFont08: PRINT "Here's the default 8x8, ";
CALL GFXScript1: PRINT "an 8x16 Script font ";
CALL GFXFont14: PRINT "and the 8x14 -- on the SAME line!"
NEXT
PRINT : PRINT : PRINT
CALL GFXFont14
PRINT
PRINT " Note that 3 fonts are printed on the SAME LINE above! But since font "
PRINT " heights differ, line heights differ as well. "
PRINT
PRINT " This is the 8x14 font. So you're looking at 3 fonts on the screen at once!"
END
DisplayIt:
CLS
FOR x = 1 TO 20
PRINT " Now is the time for the . . . "; WhichFont$
NEXT
d$ = INPUT$(1)
RETURN