Class DWriteFontFamily
The IDWriteFontFamily interface represents a set of fonts that share the same design but are differentiated by weight, stretch, and style.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.DWrite
Assembly: JeremyAnsel.DirectX.DWrite.dll
Syntax
[SecurityCritical]
public class DWriteFontFamily : DWriteFontList, IDisposable
Constructors
| Edit this page View SourceDWriteFontFamily(nint)
Initializes a new instance of the DWriteFontFamily class.
Declaration
public DWriteFontFamily(nint comPtr)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | comPtr |
Fields
| Edit this page View SourceDWriteFontFamilyGuid
The interface GUID.
Declaration
public static readonly Guid DWriteFontFamilyGuid
Field Value
| Type | Description |
|---|---|
| Guid |
Methods
| Edit this page View SourceGetFamilyNames()
Creates a localized strings object that contains the family names for the font family, indexed by locale name.
Declaration
public DWriteLocalizedStrings GetFamilyNames()
Returns
| Type | Description |
|---|---|
| DWriteLocalizedStrings |
GetFirstMatchingFont(DWriteFontWeight, DWriteFontStretch, DWriteFontStyle)
Gets the font that best matches the specified properties.
Declaration
public DWriteFont GetFirstMatchingFont(DWriteFontWeight weight, DWriteFontStretch stretch, DWriteFontStyle style)
Parameters
| Type | Name | Description |
|---|---|---|
| DWriteFontWeight | weight | Requested font weight. |
| DWriteFontStretch | stretch | Requested font stretch. |
| DWriteFontStyle | style | Requested font style. |
Returns
| Type | Description |
|---|---|
| DWriteFont |
GetMatchingFonts(DWriteFontWeight, DWriteFontStretch, DWriteFontStyle)
Gets a list of fonts in the font family ranked in order of how well they match the specified properties.
Declaration
public DWriteFontList GetMatchingFonts(DWriteFontWeight weight, DWriteFontStretch stretch, DWriteFontStyle style)
Parameters
| Type | Name | Description |
|---|---|---|
| DWriteFontWeight | weight | Requested font weight. |
| DWriteFontStretch | stretch | Requested font stretch. |
| DWriteFontStyle | style | Requested font style. |
Returns
| Type | Description |
|---|---|
| DWriteFontList |