_CONSOLEFONT
Jump to navigation
Jump to search
The _CONSOLEFONT statement is used to change the text font used in Console Windows or change its size.
Syntax
- _CONSOLEFONT fontName$, fontSize%
Parameters
- fontName$ is the name of the desired font. Note that only a few fonts are allowed, in most standard systems it will probably only be Consolas and Lucida Console.
- To see a complete list of names available on your system: open a command prompt, click on the console windows's title icon in the upper left corner, select properties and then the fonts tab.
- fontSize% specifies the pixel height of the font to use.
- Note that both arguments are mandatory, i.e. even if you just wanna change the fontSize%, you must still give the fontName$ too.
Description
- Note that any font changes globally affect the entire console window and all its contents, i.e. only one font or one specific size can be used, further _CONSOLEFONT calls will override former ones and the console window will use whatever was set last.
- Keyword not supported in Linux or macOS versions
Availability
Examples
- Example 1
- Simple usage example how to use the _CONSOLEFONT statement.
$CONSOLE:ONLY _CONSOLEFONT "Consolas", 24 PRINT: PRINT "current font is Consolas size 24": SLEEP _CONSOLEFONT "Lucida Console", 20 PRINT: PRINT "current font is Lucida Console size 20": SLEEP _CONSOLEFONT "Lucida Console", 22 PRINT: PRINT "current font is Lucida Console size 22" PRINT: PRINT "press any key...": SLEEP SYSTEM |
See also