Font Object
Overview
The Font object enables setting the current font family, color, size and other properties for text typing operations. This object is obtained via the Font property of the Canvas object.
Member List
Properties
Specifies text alignment for the Canvas.PrintTextEx method. Valid values are: 0 - left (default), 1 - right, 2 - center and 3 - justified. If a value other than 0 is specified, the Width property must also be specified.
This property was introduced in Version 1.8. It does not affect the PrintText method.
See also: Section 5.3 - Advanced Text Drawing with PrintTextEx.
Specifies the font's background color. Font.BkMode must be set to anything other that "transparent" for this property to take effect. This property is to be used in conjunction with the PrintText method. It does not affect the PrintTextEx method.
See also: Chapter 5 - Drawing & Typing
"Transparent" by default. If set to any other value, such as "Opaque", the font's background is colored with Font.BkColor. This property is to be used in conjunction with the PrintText method. It does not affect the PrintTextEx method.
See also: Chapter 5 - Drawing & Typing.
Specifies whether a bold font should be used. False by default. This property is to be used in conjunction with the PrintText method. It does not affect the PrintTextEx method.
See also: Chapter 5 - Drawing & Typing.
Specifies font color, e.g. &H00FF00 for green. 0 (black) by default. Affects both the PrintText and PrintTextEx methods.
See also: Chapter 5 - Drawing & Typing.
Specifies font family such as "Arial" or "Courier New". A system-default font is used if this property is not specified, or the specified font is not found. This property is to be used in conjunction with the PrintText method. It does not affect the PrintTextEx method.
See also: Chapter 5 - Drawing & Typing.
Specifies whether an italic font should be used. False by default. This property is to be used in conjunction with the PrintText method. It does not affect the PrintTextEx method.
See also: Chapter 5 - Drawing & Typing.
Specifies text opacity which can be useful for watermarking purposes. 0 means full transparency (text is not visible), and 1 means full opacity (background is not visible). 1 by default.
This property was introduced in Version 1.8 (Service Release 1.8.0.1). This property is to be used in conjunction with the PrintTextEx method. It does not affect the PrintText method.
See also: Section 5.3 - Advanced Text Drawing with PrintTextEx.
Specifies text quality. Valid values: 0 (Default), 1 (Draft), 2 (Proof), 3 (Non-Antialiased), 4 (Antialiased).
Text usually appears anti-aliased only if the Font.BkMode is set to "Opaque".
This property is to be used in conjunction with the PrintText method. It does not affect the PrintTextEx method.
See also: Chapter 5 - Drawing & Typing.
Specifies text rotation angle (in degrees, rotation is counter-clockwise) for both the PrintText and PrintTextEx methods. 0 (horizontal) by default.
See also: Chapter 5 - Drawing & Typing.
Specifies the color of a text shadow, if present. This property is to be used in conjunction with the PrintText method. It does not affect the PrintTextEx method.
See also: Chapter 5 - Drawing & Typing.
Specifies horizontal offset of a text shadow, in pixels. 0 by default (no shadow). This property is to be used in conjunction with the PrintText method. It does not affect the PrintTextEx method.
See also: Chapter 5 - Drawing & Typing.
Specifies vertical offset of a text shadow, in pixels. 0 by default (no shadow). This property is to be used in conjunction with the PrintText method. It does not affect the PrintTextEx method.
See also: Chapter 5 - Drawing & Typing.
Specifies font size for both PrintText and PrintTextEx methods, in pixels. 24 by default.
See also: Chapter 5 - Drawing & Typing.
Specifies line spacing adjustment (in pixels) for the Canvas.PrintTextEx method. A positive value increases the default line spacing, a negative value decreases it.
This property was introduced in Version 1.8. It does not affect the PrintText method.
See also: Section 5.3 - Advanced Text Drawing with PrintTextEx.
Specifies whether an underlined font should be used. False by default. This property is to be used in conjunction with the PrintText method and, in AspJpeg 2.1+, PrintTextEx method.
As of Version 2.1+, if this property is set to True, the method PrintTextEx draws underlined text. The width and color of the underline is specified via the Pen.Width and Pen.Color properties.
See also: Chapter 5 - Drawing & Typing.
Specifies the width of an area in which a text string drawn via Canvas.PrintTextEx is to be inscribed. Activates word wrapping if necessary. This property must also be set if the Align property is set to a value other than 0 (left alignment).
This property was introduced in Version 1.8. It does not affect the PrintText method.
See also: Section 5.3 - Advanced Text Drawing with PrintTextEx.
Methods
When Arabic characters are encountered in Text, converts individual character codes into "ligatures" (contextual joining of letters), for example:
If Reverse is True, also rearranges the characters in the opposite order to be rendered easily via PrintTextEx.
This method was introduced in Version 2.1.