Description

The FONT message sets the font that is used for printing the main body of text. This is the font that is used by the ADDTABLETABLETEXTTEXTBOXTEXTCOL, and TEXTXY messages. To set the font for the header and footer use the FONTHEADFOOT message. Call the FONT message multiple times to change the font during a printing session. The TEXTRTF message describes how to change the font in the middle of a line. The default font is 12 point Courier New.

Parameters

The first parameter is used to set the font information. The Font Name specifies the name of the font, "Times New Roman", for example. The Point Size is used to set the size of the text font. The Justification is used to set the font justification. The code that is used to specify left justification is "L", right justification is "R", and center justification is "C." The FontBold is used to make the font normal or bold. The Italics and Underline flags are used to set these font properties. The ForeColor parameter sets the color of the font. The TextAngle parameter specifies the angle, in tenths of degrees, between the base line of a character and the horizontal. The TextAlign parameter deterimes if the text is aligned at the top, bottom, or baseline of the font.

The second parameter for the FONT message is the Spacing parameter. The Interline Spacing is used to set the percentage between printed lines. To print double spacing, set the Interline Spacing to 200. To print single spacing, set the Interline Spacing to 100. To print the text lines closer together set the Interline Spacing less than 100.

ParameterDescription of FieldsCommentsDefault
Parm1 - FontInfo<1> Font Name"Font String"Courier New
 <2> Point Size4-12810
 <3> Justification"L", "R", or "C""L"
 <4> FontBold0=Normal

1=Bold

0
 <5> Italics0/10
 <6> Underline0/10
 <7> Strikethrough0/1 -- NOT USED0
 <8> ForeColorCOLORREF0 - black
 <9> TextAngleIn tenth of degrees0
 <10> TextAlign0=Top

1=Bottom 2=Baseline

0
Parm2 - Spacing<1> Interline SpacingPercentage of line spacing100

See also

FONTHEADFOOTTABLETEXTTEXTXYTEXTCOL

Example

/*  The following example shows how to use the FONT message to change the font to Bold, 14 point, Times New Roman.  */
 
declare function Set_Printer
stat = Set_Printer("INIT") ;* Start printing
font = "Times New Roman,14,L,1" ;* 14 point, Left just, Bold
convert "," to @fm in font ;* Use @fm delimiters
stat = Set_Printer("FONT", font) ;* Set font
stat = Set_Printer("TEXT", "Test 1 2 3") ;* Print text with new font
stat = Set_Printer("TERM") ;* End printing
  • No labels