home *** CD-ROM | disk | FTP | other *** search
- ' ──────────────────────────────────────────────────────────────────────────
- '
- ' Q F O N T . B A S
- '
- ' A utility for changing the screen font at DOS using a VGA monitor
- '
- ' This program, source code and executable, are (c) Copyright 1992 by
- ' Tony Martin.
- '
- ' To compile this file, you must either use the command line
- '
- ' QB QFONT / L QBSCR20
- '
- ' Or use the source builder program to create a source file that includes
- ' the routines FirstFile, VgaPresent, EgaPresent, LoadEgaTextFont,
- ' and LoadVgaTextFont, and load it in into QuickBASIC in addition to
- ' this file. If you go the second route, you must load this program with
- ' the QB library, provided with QuickBASIC. Use the following command line
- ' to do this:
- '
- ' QB QFONT /L QB
- '
- ' ──────────────────────────────────────────────────────────────────────────
-
- '$INCLUDE: 'qb.bi'
- '$INCLUDE: 'qbscr.inc'
-
- CONST EGA = 0
- CONST VGA = 1
-
- ' Increase stack space.
- CLEAR , , 8192
-
- ' Display help if requested.
- IF COMMAND$ = "/?" THEN
- PRINT
- PRINT "Usage: QFONT [fontfile] [/?]"
- PRINT
- PRINT " where fontfile is the name of the VGA font file to load."
- PRINT " Omitting a fontfile on the command line resets the font to normal."
- END
- END IF
-
- ' See if we are using a VGA monitor.
- IF VgaPresent% = FALSE THEN
- IF EgaPresent% = FALSE THEN
- PRINT
- PRINT "You need an EGA or VGA adapter and display to use QFONT"
- END
- ELSE
- adapter% = EGA
- END IF
- ELSE
- adapter% = VGA
- END IF
-
- ' See if requested file exists. If not, dispay a message end exit.
- IF COMMAND$ <> "" THEN
- IF FirstFile%(COMMAND$, NormalAttr, dta$) = 0 THEN
- PRINT
- PRINT "The font requested, "; COMMAND$; ", does NOT exist."
- END
- END IF
- END IF
-
- ' Display header and set font.
- PRINT : PRINT "QFONT ∙ (c) 1992 by Tony Martin."
- IF COMMAND$ <> "" THEN
- PRINT "Loading font "; UCASE$(COMMAND$); "..."
- ELSE
- PRINT "Reseting to internal font..."
- END IF
-
- IF adapter% = VGA THEN
- LoadVgaTextFont COMMAND$
- ELSE
- LoadEgaTextFont COMMAND$
- END IF
-
- END
-
-