IDWriteFactory interface (dwrite.h)

Used to create all subsequent DirectWrite objects. This interface is the root factory interface for all DirectWrite objects.

Inheritance

The IDWriteFactory interface inherits from the IUnknown interface. IDWriteFactory also has these types of members:

Methods

The IDWriteFactory interface has these methods.

 
IDWriteFactory::CreateCustomFontCollection

Creates a font collection using a custom font collection loader.
IDWriteFactory::CreateCustomFontFileReference

Creates a reference to an application-specific font file resource.
IDWriteFactory::CreateCustomRenderingParams

Creates a rendering parameters object with the specified properties. (IDWriteFactory.CreateCustomRenderingParams)
IDWriteFactory::CreateEllipsisTrimmingSign

Creates an inline object for trimming, using an ellipsis as the omission sign.
IDWriteFactory::CreateFontFace

Creates an object that represents a font face.
IDWriteFactory::CreateFontFileReference

Creates a font file reference object from a local font file.
IDWriteFactory::CreateGdiCompatibleTextLayout

Takes a string, format, and associated constraints, and produces an object representing the result, formatted for a particular display resolution and measuring mode.
IDWriteFactory::CreateGlyphRunAnalysis

Creates a glyph run analysis object, which encapsulates information used to render a glyph run. (IDWriteFactory.CreateGlyphRunAnalysis)
IDWriteFactory::CreateMonitorRenderingParams

Creates a rendering parameters object with default settings for the specified monitor. In most cases, this is the preferred way to create a rendering parameters object.
IDWriteFactory::CreateNumberSubstitution

Creates a number substitution object using a locale name, substitution method, and an indicator whether to ignore user overrides (use NLS defaults for the given culture instead).
IDWriteFactory::CreateRenderingParams

Creates a rendering parameters object with default settings for the primary monitor. Different monitors may have different rendering parameters, for more information see the How to Add Support for Multiple Monitors topic.
IDWriteFactory::CreateTextAnalyzer

Returns an interface for performing text analysis.
IDWriteFactory::CreateTextFormat

Creates a text format object used for text layout. (IDWriteFactory.CreateTextFormat)
IDWriteFactory::CreateTextLayout

Takes a string, text format, and associated constraints, and produces an object that represents the fully analyzed and formatted result.
IDWriteFactory::CreateTypography

Creates a typography object for use in a text layout.
IDWriteFactory::GetGdiInterop

Creates an object that is used for interoperability with GDI.
IDWriteFactory::GetSystemFontCollection

Gets an object which represents the set of installed fonts.
IDWriteFactory::RegisterFontCollectionLoader

Registers a custom font collection loader with the factory object.
IDWriteFactory::RegisterFontFileLoader

Registers a font file loader with DirectWrite.
IDWriteFactory::UnregisterFontCollectionLoader

Unregisters a custom font collection loader that was previously registered using RegisterFontCollectionLoader.
IDWriteFactory::UnregisterFontFileLoader

Unregisters a font file loader that was previously registered with the DirectWrite font system using RegisterFontFileLoader.

Remarks

Create an IDWriteFactory object by using the DWriteCreateFactory function.


if (SUCCEEDED(hr))
{
    hr = DWriteCreateFactory(
        DWRITE_FACTORY_TYPE_SHARED,
        __uuidof(IDWriteFactory),
        reinterpret_cast<IUnknown**>(&pDWriteFactory_)
        );
}


An IDWriteFactory object holds state information, such as font loader registration and cached font data. This state can be shared or isolated. Shared is recommended for most applications because it saves memory. However, isolated can be useful in situations where you want to have a separate state for some objects.

Requirements

Requirement Value
Minimum supported client Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header dwrite.h