GDI Plus Font Foundation Class
The gpFont class defines a particular format for text, including font face, size, and style attributes.
Category | Reporting |
---|---|
Default Catalog |
Visual FoxPro Catalog\Foundation Classes\Output\GDIplus |
Class |
gpFont |
Base Class |
Custom |
Class Library |
_GDIPLUS.vcx |
Parent Class |
gpObject (GDI Plus Object Foundation Class) |
Remarks
The following table lists public properties and methods added by this class to its parent class, gpObject. It also implements the Clone and Init methods.
Values listed as em height in the table are equivalent to cell ascent (height of the font above the line) + cell descent (height of the font below the line) - internal leading of the font. Values listed as line spacing are equal to cell ascent + cell descent + external leading.
Properties and methods | Description |
---|---|
Clone Method |
Clones a font object. Syntax: Return Values: Logical, representing success or failure. Parameters: toFont, required, the gpFont object to clone. |
Create Method |
Creates a font object from a specified set of font attributes. Syntax: Return Values: Logical, representing success or failure. Parameters: tvFontNameOrFamily, required, a gpFontFamily object or a string representing the name of a font. tnSize, required, size in specified units. tnStyle, optional, fontstyle attributes as specified in GDIPLUS_FontStyle_* constants. Default value is tnUnits, optional, units for font size as specified in GDIPLUS_Unit_* constants. Default value is |
FontName Property |
Font name, for example Default: Empty. |
GetHeight Method |
Get line spacing for a font for a given graphics object, using the units of that graphics object. Syntax: Return Values: Number, line-height. Returns null ( Parameters: tvGraphics, required, a gpGraphics object or a GDI+ graphics handle. |
GetHeightGivenDPI Method |
Get line spacing for a font given a value in dots per inch (DPI). Syntax: Return Values: Number, line-height. Returns null ( Parameters: tnDPI, required, a number of dots per inch. |
Init Method |
Constructs a font object during initialization if passed appropriate arguments. Syntax: Return Values: Logical, representing success or failure. If the method fails, the object does not instantiate. Parameters: tvFontNameOrFamily, required if immediate creation of the object is requested. A gpFontFamily object or a string representing the name of a font. tnSize, required, size in specified units. tnStyle, optional, fontstyle attributes as specified in GDIPLUS_FontStyle_* constants. Default value is tnUnits, optional, units for font size as specified in GDIPLUS_Unit_* constants. Default value is |
Size Property |
The em size of the font using the units of this font object. Default: Empty. |
Style Property |
Style information for this font object, using GDIPLUS_FontStyle_* constant values. Default: Empty. |
Unit Property |
The unit of measure used by this font, using GDIPLUS_Unit_* constant values. Default: Empty. |
See Also
Reference
Visual FoxPro Foundation Classes A-Z
GDI Plus API Wrapper Foundation Classes