Home
What's New

User Manual
Object Reference
ASPJpeg
Brush
Canvas
Font
Gif
Info
InfoItem
Pen

Live Demos
Support

Download & Buy

Other Products
Contact Us


Search this site:

Font Object

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.

Properties Methods
Align
BkColor
BkMode
Bold
Color
Family
Italic
Opacity
Quality
Rotation
ShadowColor
ShadowXoffset
ShadowYoffset
Size
Spacing
Underlined
Width
No methods

Font Properties

Align As Long (read/write)
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.

BkColor As Long (read/write)
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.

BkMode As String (read/write)
"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.

Bold As Long (read/write)
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.

Color As Long (read/write)
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.

Family As String (read/write)
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.

Italic As Long (read/write)
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.

Opacity As Single (read/write)
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). It does not affect the PrintText method.

See also: Section 5.3 - Advanced Text Drawing with PrintTextEx.

Quality As Long (read/write)
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.

Rotation As Long (read/write)
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.

ShadowColor As Long (read/write)
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.

ShadowXoffset As Long (read/write)
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.

ShadowYoffset As Long (read/write)
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.

Size As Long (read/write)
Specifies font size for both PrintText and PrintTextEx methods, in pixels. 24 by default.

See also: Chapter 5 - Drawing & Typing.

Spacing As Long (read/write)
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.

Underlined As Long (read/write)
Specifies whether an underlined 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.

Width As Long (read/write)
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.

Home
Copyright © 1998 - 2007 Persits Software, Inc.
All Rights Reserved.
AspJpeg is a trademark of Persits Software, Inc.