change-font - Change the screen font
[IBM-PC / MS-DOS]
change-font "mode-no" "spec"
n change-font "name" charSet weight width height
change-font is a platform specific command which allows the displayable font to be modified. The selection of font is determined by the monitor resolution and the capabilities of the graphics adapter.
This command is available on all systems except termcap. While MS-DOS does not support the concept of different fonts, it does (or at least the graphics card does) support the concept of changing screen resolution, which has the effect of changing the font. Each platform takes different arguments and are considered independently, as follows:
The X-Windows UNIX environments accept a single argument which is a fully qualified font name. Simply give the font X name and the font will change if it is available. The window size changes to attempt to retain the same number of rows and columns so ensure that when changing to a larger font then there is enough room (or a way) to resize a window which is larger than the actual screen.
The X font string describes the attributes of the font in terms of it's size name etc. as follows:-
The default font used by MicroEmacs '06 is
A good font to try is:
The font may also be changed in your .Xdefaults file by inserting the line:-
MS-DOS may only change the screen resolution, the standard screen resolution is either 80 columns by 25 rows or 80 by 50. A more advanced graphics card can typically support up to 132 by 60, MicroEmacs in theory has no limit but it has only been tested up to this size.
The main problem with MS-DOS machines is that there is no standard and this is no exception. The graphics mode needed to get a 132 by 60 screen (if available) varies from one card to the next so MicroEmacs '06 needs to know the graphic mode number your card uses to get your required screen resolution.
MicroEmacs '06 can also attempt a little bit of magic to double the number of rows on the screen for a given screen resolution. This is how 50 lines are obtained from the standard 25 line mode 3. If the value of "spec" is non-zero then this is attempted, to the authors knowledge this will either work or not depending on the direction of the wind and no harm will befall the users equipment. However the author also quickly disclaims anything and everything, the user uses this at their own peril, like everything else.
Following are the standard MS-DOS text modes:
change-font "2" "0" ; Simple monochrome or EGA monitor, 80 by 25. change-font "3" "0" ; Simple EGA/VGA monitor, again 80 by 25. change-font "3" "1" ; Simple EGA/VGA monitor using spec, 80 by 50.
Most Trident cards support the following text mode:
change-font "86" "0" ; Sweet 132 by 60
A Diamond Stealth supports the following mode:
change-font "85" "1" ; Nice 132 by 50
Cirrus video cards (1MB) seem to support:
change-font "84" "1" ; PT-526 (132x50)
Time to start digging out your graphics card manual!
The Microsoft Windows environments utilize font files to drive the display. When change-font is invoked with no arguments, or a negative argument then a font dialog is presented to the user to allow the font to be selected. The current font is not changed if a negative argument is given, in both cases the variable $result(5) is set the the user selected font. The format of the returned string is "OWwwwwhhhhhFontName", where:-
If a positive argument is specified with change-font then the arguments are explicitly entered, arguments are defined as follows:-
An empty name ("") may be specified resulting in the selection of the default system OEM font. No other arguments are required when specified.
Note that Courier New is not actually a fixed mono font as might be expected.
0 - ANSI or Western (True Type etc)
161 - Greek
162 - Turkish
204 - Russian
255 - OEM (or bitmapped)
0 - Don't care (Automatically selected).
1 - Thin
2 - Extra Light
3 - Light
4 - Normal
5 - Medium
6 - Semi-Bold
7 - Bold
8 - Extra-Bold
9 - Heavy
Note that you may request a weight and it is not honored. Typically 4 and 7 are honored by most font definitions. 4 is typically used.
Note that if the width is specified as zero then the height should be specified and the width will be automatically selected.
Note: as with the weight the width and height may not be honored if the font cannot support the specified width/height in which case the closest matching height is automatically selected
For releases prior to '99, the Terminal font is the standard MS-DOS font used for the MS-DOS window. This is an OEM fixed width character set which contains all of the conventional symbols found in the DOS shell.
Releases of MicroEmacs post '99 may utilise any of the windows fonts, typically Courier New or Lucida Console are used, these provide the best screen rendering of characters. Lucida Console is slightly better with a smaller font size as this allows a '1' (one) and 'l' (lower case L) to be distinguished.
The Terminal fonts are the same as shown in the DOS window the last 2 arguments are the width x height, the terminal equivalents (Bit Mapped) are commented here.
The best options for the fonts are defined as follows:-
;Standard Terminal Fonts - standard weight ;change-font "Terminal" 0 4 4 6 change-font "Terminal" 0 4 6 8 ;change-font "Terminal" 0 4 8 8 ;change-font "Terminal" 0 4 5 12 ;change-font "Terminal" 0 4 7 12 ;change-font "Terminal" 0 4 8 12 ;change-font "Terminal" 0 4 12 16 ;change-font "Terminal" 0 4 10 18 ;Standard Terminal Fonts - heavy weight ;change-font "Terminal" 0 7 4 6 ;change-font "Terminal" 0 7 6 8 ;change-font "Terminal" 0 7 8 8 ;change-font "Terminal" 0 7 5 12 ;change-font "Terminal" 0 7 7 12 ;change-font "Terminal" 0 7 8 12 ;change-font "Terminal" 0 7 12 16 ;change-font "Terminal" 0 7 10 18
The "Courier New" font is not actually a fixed mono font as might be expected.
Copyright (c) 1998-2006 JASSPA
Last Modified: 2006/07/28
Generated On: 2006/10/07