ID3DXFont interface
The ID3DXFont interface encapsulates the textures and resources needed to render a specific font on a specific device.
Members
The ID3DXFont interface inherits from the IUnknown interface. ID3DXFont also has these types of members:
Methods
The ID3DXFont interface has these methods.
Method | Description |
---|---|
DrawText | Draws formatted text. This method supports ANSI and Unicode strings. |
GetDC | Returns a handle to a display device context (DC) that has the font set. |
GetDesc | Gets a description of the current font object. GetDescW and GetDescA are identical to this method, except that a pointer is returned to a D3DXFONT_DESCW or D3DXFONT_DESCA structure, respectively. |
GetDevice | Retrieves the Direct3D device associated with the font object. |
GetGlyphData | Returns information about the placement and orientation of a glyph in a character cell. |
GetTextMetrics | Retrieves font characteristics that are identified in a TEXTMETRIC structure. This method supports ANSI and Unicode compiler settings. |
OnLostDevice | Use this method to release all references to video memory resources and delete all stateblocks. This method should be called whenever a device is lost, or before resetting a device. |
OnResetDevice | Use this method to re-acquire resources and save initial state. |
PreloadCharacters | Loads a series of characters into video memory to improve the efficiency of rendering to the device. |
PreloadGlyphs | Loads a series of glyphs into video memory to improve the efficiency of rendering to the device. |
PreloadText | Loads formatted text into video memory to improve the efficiency of rendering to the device. This method supports ANSI and Unicode strings. |
Remarks
The ID3DXFont interface is obtained by calling D3DXCreateFont or D3DXCreateFontIndirect.
The LPD3DXFONT type is defined as a pointer to the ID3DXFont interface.
typedef interface ID3DXFont ID3DXFont;
typedef interface ID3DXFont *LPD3DXFONT;
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|
See also