Exposes a font object's properties through Automation. It provides a subset of the IFont methods.
When to implement
A font object implements this interface along with IFont to provide access to the font's properties through Automation. Typically, it is not necessary to implement this interface on your own object, since there is a COM-provided implementation of the font object.
When to use
Use this interface to change or retrieve the properties of a font object through the IDispatch::Invoke method in Automation.
The IFontDisp interface inherits from the IDispatch interface but does not have additional members.
The following table describes the dispIDs for the various font properties.
Each property in the IFontDisp interface includes a get_PropertyName method if the property supports read access and a put_PropertyName method if the property supports write access. These properties support both read and write access.
|Name||BSTR||RW||The facename of the font, e.g. Arial.|
|Size||CY||RW||The point size of the font, expressed in a CY type to allow for fractional point sizes.|
|Bold||BOOL||RW||Indicates whether the font is boldfaced.|
|Italic||BOOL||RW||Indicates whether the font is italicized.|
|Underline||BOOL||RW||Indicates whether the font is underlined.|
|Strikethrough||BOOL||RW||Indicates whether the font is strikethrough.|
|Weight||short||RW||The boldness of the font.|
|Charset||short||RW||The character set used in the font, such as ANSI_CHARSET, DEFAULT_CHARSET, or SYMBOL_CHARSET.|
The system provides a standard implementation of a font object with the IFontDisp interface on top of the underlying system font support. A font object is created through the function OleCreateFontIndirect. A font object supports a number of read/write properties as well as a set of methods through its interface IFont and supports the same set of properties (but not the methods) through a dispatch interface IFontDisp which is derived from IDispatch to provide access to the font's properties through Automation. The system implementation of the font object supplies both interfaces.
Minimum supported client
|Windows 2000 Professional [desktop apps only]|
Minimum supported server
|Windows 2000 Server [desktop apps only]|
IID_IFontDisp is defined as BEF6E003-A874-101A-8BBA-00AA00300CAB