Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The ID3DXFont interface encapsulates the textures and resources needed to render a specific font on a specific device.
The ID3DXFont interface inherits from the IUnknown interface. ID3DXFont also has these types of members:
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. |
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;
Requirement | Value |
---|---|
Header |
|
Library |
|
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today