Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 ADDTABLE, TABLETEXTTEXTBOXTEXTCOL, and TEXTXY messages. To set the font for the header and footer use the FONTHEADFOOTmessage 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.

...

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

...

Code Block
/*  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