RpPrinter:SetFont() Method

<< Click to Display Table of Contents >>

Navigation:  RpPrinter & PtrDevice Class Overview > RpPrinter Class >

RpPrinter:SetFont() Method

Previous pageReturn to chapter overviewNext page

Purpose

To create a font and set it as the current font for the RpPrinter object.

Syntax

<oRpPrinter>:SetFont(cFaceName, nPointSize, [lBold], [lItalic],

[lUnderline], [nRotation], [nEscapement])

Arguments

cFaceName

The name of the font.  For example, "Arial"

nPointSize

The height of the font in points (1/72 of an inch).

lBold

Optional.  TRUE = bold.  The default is FALSE.

lItalic

Optional.  TRUE = italic. The default is FALSE.

lUnderline

Optional.  TRUE = underlined. The default is FALSE.

nRotation

Optional. Specifies the angle, in tenths of degrees, between the base line of a character and the x-axis. The angle is measured in a counterclockwise direction from the x-axis.  The default is 0.

nEscapement

Optional.  Specifies the angle, in tenths of degrees, between the escapement vector and the x-axis of the screen surface. The escapement vector is the line through the origins of the first and last characters on a line. The angle is measured counterclockwise from the x-axis.  The default is 0.

Description

This method sets the font that RpPrinter uses for DrawText and TextOut.  The font is automatically created and destroyed by the RpPrinter object.  

Example

// Set the font to a 12 point bold Arial

oRpPrinter:SetFont("Arial", 12, True)