The :font. tag is used to change the current font within the text of the current window. When a heading tag that defines a new window is encountered, the font is reset to the system default font.
The font tag has three attributes: facename= and size= are required; codepage= is optional. If a code page value is not specified, the code page of the active system is used.
facename= specifies the name of the font you want to change to. Some of the common values for this attribute are:
Helv
Courier
default
size= specifies the height and width, in points, of the font you have selected. (A point is a typesetting measure equal to approximately 1/72 of an inch.) The value is expressed in the form, HxW. For example, suppose you want to change the current font to an 18-point-high by 10-point-wide Helvetica font. You would specify:
:font facename=Helv size=18x10.
You do not have to know exact point values. IPF uses a "best fit" method to select the font. If, in the example above, you had specified 20x12 as the size value, IPF would have selected Helv 18x10 because it is the closest size to the one you specified.
Using :font., you can make as many font changes within a window as you want. You can define highlighted phrases while a font tag is in effect, and the tagged text will be displayed in the font style corresponding to that typeface.
You can use :font. within the :xmp. and :cgraphic. tags to change the default system monospace font. To change the default system monospace font, specify the desired facename= and size= attribute.
The following resets the font to the default system proportional font.
:font facename=default size=0x0.
In the following example, the font style is reset for each list item in the simple list.
Input Example
:p.The following illustrate available fonts: :sl. :font facename=Courier size=13x8. :li.This sentence is in Courier 13 by 8 font. .* :font facename='Tms Rmn' size=18x14. :li.This sentence is in 'Tms Rmn' 18 by 14 font. .* :font facename=Helv size=28x18. :li.This sentence is in Helvetica 28 by 18 font. .* :font facename=default size=0x0. :li.This sentence is in the default system font. :esl.
Here is the formatted output.
Example of the Font Tag
This sentence is in Courier 13 by 8 font.
This sentence is in 'Tms Rmn' 18 by 14 font.
This sentence is in Helvetica 28 by 18 font.
This sentence is in the default system font.