PrintSetFont
PowerScript function
Description
Designates a font to be used for text printed with the Print
function. You specify the font by number. Use PrintDefineFont to associate
a font number with the desired font, a size, and a set of
properties.
Syntax
|
1 |
PrintSetFont ( printjobnumber, fontnumber ) |
|
Argument |
Description |
|---|---|
|
printjobnumber |
The number the PrintOpen function assigned to the print |
|
fontnumber |
The number (1 to 8) of a font defined for the job in |
Return value
Integer. Returns the character height of the current font if it
succeeds and -1 if an error occurs. If any argument’s value is null,
PrintSetFont returns null.
Examples
This example starts a new print job and specifies that font number 2
is Courier, 18 point, bold, default pitch, in modern font, with no italic
or underline. The PrintSetFont statement sets the current font to font 2.
Then the Print statement prints the company name:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
long Job // Start a new print job and a new page. Job = PrintOpen() // Define the font for Job. PrintDefineFont(Job, 2, "Courier 10Cps", & 250, 700, Default!, Modern!, FALSE, FALSE) // Set the font for Job. PrintSetFont(Job, 2) // Print the company name in the specified font. Print(Job,"Appeon Corporation") |
See also