XPRINT FONT statement

Purpose

Select a font to be used by the XPRINT statement.

XPRINT FONT has been superceded by the XPRINT SET FONT statement, although XPRINT FONT remains supported for a limited period.  Existing code should be converted to the new syntax as soon as possible.

Syntax

XPRINT FONT fontname$ [,points&, style&]

fontname$

Name of the font.

points&

Size of the font, in points.

style&

Font style attribute. Any of the following values can be combined or used alone:

0 = normal

1 = bold

2 = italic

4 = underline

8 = strikeout

For example, a style& value of 3 specifies a combination of both bold and italic attributes.

Remarks

If the requested font is not available on the computer, Windows will search for a substitute font, which is similar to the attributes specified (CharSet, Font Family, etc.).

You may use the value zero (0) for any of the numeric parameters to designate that the compiler should use the default for that item.  If parameter(s) are missing, the compiler substitutes the default value for all remaining parameters.

Prior to any XPRINT operations, a host printer must first be selected with XPRINT ATTACH.  If no XPRINT FONT statement is executed, the default font is Courier New with no style attributes.  If XPRINT FONT is unsuccessful, an error is generated.

See also

FONT NEW, XPRINT, XPRINT ATTACH, XPRINT CHR SIZE, XPRINT SET FONT, XPRINT TEXT SIZE

Example

' Set the font for the host printer to:

' to Times New Roman, 18 points, bold + italic + underline (1+2+4).

XPRINT FONT "Times New Roman", 18, 7