This escape sequence allows control over the font that is used for subsequent output.
Parameter |
Value or Description |
Lead-in |
<ESC>f |
Sequence |
Italic,Underline,Weight,Point Size,Font Name |
Termination |
null |
where:
Italic |
0 for normal, 1 for italic |
Underline |
0 for normal, 1 for italic |
Weight |
1 for light, 4 for normal, 7 for bold (valid 1-9) |
Point Size |
character height (about 72 points per inch) |
Font Name |
"Arial" and "Courier New" for example |
Example
Sets to 14 point bold-Arial:
PRINT CHR$(27);"f";
PRINT "0,0,7,14,Arial";CHR$(0);
After a font change has occurred, the GDI engine compensates a "line feed" so that the following line will be placed relative to the height of the font.