The ID3DXFont interface encapsulates the textures and resources needed to render a specific font on a specific device.
Method | Description |
---|---|
ID3DXFont::DrawText | Draws formatted text. This method supports ANSI and Unicode strings. |
ID3DXFont::GetDC | Returns a handle to a display device context (DC) that has the font set. |
ID3DXFont::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_DESCD3DXFONT_DESCW |
ID3DXFont::GetDevice | Retrieves the Direct3D device associated with the font object. |
ID3DXFont::GetGlyphData | Returns information about the placement and orientation of a glyph in a character cell. |
ID3DXFont::GetTextMetrics | Retrieves font characteristics that are identified in a TEXTMETRIC structure. This method supports ANSI and Unicode compiler settings. |
ID3DXFont::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. |
ID3DXFont::OnResetDevice | Use this method to re-acquire resources and save initial state. |
ID3DXFont::PreloadCharacters | Loads a series of characters into video memory to improve the efficiency of rendering to the device. |
ID3DXFont::PreloadGlyphs | Loads a series of glyphs into video memory to improve the efficiency of rendering to the device. |
ID3DXFont::PreloadText | Loads formatted text into video memory to improve the efficiency of rendering to the device. This method supports ANSI and Unicode strings. |
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;
Header: Declared in D3dx9core.h.
Import Library: Use D3dx9.lib.