DirectWrite API Reference
Interfaces
Core interfaces for interacting with DirectWrite functionality.
IDWriteFactory
The main entry point for the DirectWrite API. Used to create various DirectWrite objects.
Methods:
CreateTextLayout(...)GetGdiInterop(...)CreateFontCollectionFromFile(...)
IDWriteFontCollection
Represents a collection of fonts, such as those installed on the system.
IDWriteFont
Represents a single font in a font family.
IDWriteFontFamily
Represents a font family, which is a collection of fonts that share a common family name.
IDWriteFontFace
Represents a specific face of a font, allowing access to glyph metrics and other font face properties.
IDWriteGlyphRun
Represents a contiguous run of glyphs with the same font face, size, and orientation.
IDWriteGlyphRunAnalysis
Provides detailed analysis of a glyph run, including glyph placement and shaping results.
IDWriteTextAnalyzer
Performs text analysis, including script analysis, line breaking, and glyph shaping.
IDWriteTextAnalysis
Represents the results of text analysis, such as script properties and text boundaries.
IDWriteTextCompositor
Composes glyphs into lines of text, handling layout and line breaking.
IDWriteTextLayout
Represents a piece of text with associated layout properties, such as paragraph alignment, font properties, and trimming.
IDWriteTextRenderer
An interface implemented by applications to receive drawing commands for text rendering.
IDWriteTextMetrics
Contains text layout metrics, such as width, height, and line spacing.
IDWriteLayoutMetrics
Contains detailed metrics for a text layout, including text bounds and line metrics.
IDWriteInlineObject
Represents an inline object within text, such as an image or a custom element.
IDWriteColorFont
Represents a font that includes color glyphs.
IDWriteColorFontSet
Represents a set of color fonts.
Structs
Data structures used by DirectWrite APIs.
DWRITE_MATRIX
Represents a 3x2 transformation matrix for 2D graphics.
DWRITE_RECT
Represents a rectangle using coordinates of its top-left and bottom-right corners.
DWRITE_FONT_METRICS
Contains font-wide metrics that apply to all glyphs in the font.
DWRITE_GLYPH_OFFSET
Specifies an offset to apply to a glyph's position.
DWRITE_TEXT_RANGE
Specifies a range of text by its starting character index and length.
DWRITE_GLYPH_RUN
Describes a run of glyphs to be rendered.
DWRITE_LINE_PARAGRAPH
Represents metrics for line height and paragraph spacing.
Enums
Enumerated types for various DirectWrite properties.
DWRITE_FONT_WEIGHT
Specifies the boldness of a font.
DWRITE_FONT_STRETCH
Specifies the degree of condensation or expansion of a font.
DWRITE_FONT_STYLE
Specifies the style of a font (normal, italic, or oblique).
DWRITE_GLYPH_ORIENTATION
Specifies the orientation of a glyph run.
DWRITE_TEXT_ALIGNMENT
Specifies the horizontal alignment of text within a line.
DWRITE_PARAGRAPH_ALIGNMENT
Specifies the vertical alignment of paragraphs within the layout box.
Functions
Top-level functions for DirectWrite.
DWriteCreateFactory
Creates an instance of the DirectWrite factory.
DWriteGetFontParameters
Retrieves parameters for a given font.
DWriteCreateTextLayout
Creates a text layout object for measuring and drawing text.