change-font - Change the screen font
[X-Windows]
change-font "fontName"
[IBM-PC / MS-DOS]
change-font "mode-no" "spec"
[Microsoft Windows]
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:-
-foundry-family-weight-slant-width--pixels-point-hres-vres-space-av-set
Where
foundry
family
weight
slant
width
pixels
point
hres
vres
space
av
set
The default font used by MicroEmacs '99 is
-*-fixed-medium-r-normal--15-*-*-*-c-90-iso8859-1
A good font to try is:
change-font "-misc-fixed-medium-r-normal--13-*-*-*-c-80-iso8859-1"
The font may also be changed in your .Xdefaults file by inserting the line:-
MicroEmacs.font "-misc-fixed-medium-r-normal--13-*-*-*-c-80-iso8859-1"
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 '99 needs to know the graphic mode number your card uses to get your required screen resolution.
MicroEmacs '99 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.
MicroEmacs '99 attempts to determine the new screen width and depth itself, in case this fails the commands change-screen-width(2) and change-screen-depth(2) may be used to correct the problem.
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 -ve 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 -ve 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:-
O
W
wwww
hhhh
FontName
If a +ve argument is specified with change-font then the arguments are explicitly entered, arguments are defined as follows:-
font
default may be specified and the system default OEM font. No other arguments are required when specified.
Note that Courier New is not actually a fixed mono font as might be expected.
charSet
0 - OEM (or bitmapped)
1 - ANSI (True Type etc).
weight
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.
width
Note that if the width is specified as zero then the height should be specified and the width will be automatically selected.
height
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.
7x12
6x8
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.
(c) Copyright JASSPA 1999
Last Modified: 1999/01/19
Generated On: 1999/12/01