Export (0) Print
Expand All
2 out of 4 rated this helpful - Rate this topic

Font Class (Microsoft.DirectX.Direct3D)

Encapsulates the textures and resources needed to render a specific font on a specific device.

Definition

Visual BasicNotInheritable Public Class Font
    Inherits MarshalByRefObjectLeave Site
    Implements IDisposableLeave Site
C#public sealed class Font : MarshalByRefObjectLeave Site, IDisposableLeave Site
C++public ref class Font sealed : MarshalByRefObjectLeave Site, IDisposableLeave Site
JScriptpublic final class Font extends MarshalByRefObjectLeave Site implements IDisposableLeave Site

Members Table

The following table lists the members exposed by the object.

Events

EventDescription
Disposing Occurs when the Dispose method is called or when the Font object is finalized and collected by the garbage collector of the .NET common language runtime.
Lost Occurs when an object is lost, normally just before a device is reset.
Reset Occurs after the Font.OnResetDevice method is called or after the Device is reset.

Methods

MethodDescription
Dispose Immediately releases the unmanaged resources used by the Font object.
DrawText Draws formatted text.
Equals Returns a value that indicates whether the current instance is equal to a specified object.
Finalize Allows the Font object to free resources before it is destroyed by the garbage collector.
Font Creates a new instance of a Font class.
GetGlyphData Returns information about the placement and orientation of a glyph in a character cell.
GetHashCode Returns the hash code for the current instance.
GetObjectByValue This member supports the infrastructure for Microsoft DirectX 9.0 for Managed Code and is not intended to be used directly from your code.
MeasureString Measures the rectangular dimensions of the specified text string when drawn with the specified Sprite object and formatted with the specified DrawTextFormat method of formatting text.
OnLostDevice Releases all references to video memory resources and deletes all state blocks.
OnResetDevice Should be called after the device is reset and before any other methods are called, if Device.IsUsingEventHandlers is set to false.
static (Shared in Visual Basic) op_Equality Compares the current instance of a class to another instance to determine whether they are the same.
static (Shared in Visual Basic) op_Inequality Compares the current instance of a class to another instance to determine whether they are different.
PreloadCharacters Loads a series of characters into video memory to improve the efficiency of rendering to a device.
PreloadGlyphs Loads a series of glyphs into video memory to improve the efficiency of rendering to a device.
PreloadText Loads formatted text into video memory to improve the efficiency of rendering to a device.
raise_Disposing Raises the Microsoft.DirectX.Direct3D.Font.Disposing event when called from within a derived class.
raise_Lost Raises a Font.Lost event when called from within a derived class.
raise_Reset Raises a Font.Reset event when called from within a derived class.
UpdateUnmanagedPointer Updates the unmanaged pointer for this Font object. This method supports the Microsoft .NET Framework infrastructure and is not intended to be used directly in your code.

Properties

PropertyDescription
Description Retrieves a description of the current font object.
Device Retrieves the Microsoft Direct3D device associated with a font object.
DeviceContext Returns a handle to a display device context (DC) that includes the font set.
Disposed Gets a value that indicates whether the object is disposed.
UnmanagedComPointer Returns the unmanaged Component Object Model (COM) ID3DXFont interface pointer.

Inheritance Hierarchy

Class Information

NamespaceMicrosoft.DirectX.Direct3D
AssemblyMicrosoft.DirectX.Direct3DX (microsoft.directx.direct3dx.dll)
Strong NameMicrosoft.DirectX.Direct3DX,  Version=1.0.900.0,  Culture=neutral,  PublicKeyToken=d3231b57b74a1492
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.