Class DWriteFontFile
The interface that represents a reference to a font file.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.DWrite
Assembly: JeremyAnsel.DirectX.DWrite.dll
Syntax
[SecurityCritical]
public class DWriteFontFile : DXComObject, IDisposable
Constructors
| Edit this page View SourceDWriteFontFile(nint)
Initializes a new instance of the DWriteFontFile class.
Declaration
public DWriteFontFile(nint comPtr)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | comPtr |
Fields
| Edit this page View SourceDWriteFontFileGuid
The interface GUID.
Declaration
public static readonly Guid DWriteFontFileGuid
Field Value
| Type | Description |
|---|---|
| Guid |
Methods
| Edit this page View SourceAnalyse(out bool, out DWriteFontFileType, out DWriteFontFaceType, out uint)
Analyzes a file and returns whether it represents a font, and whether the font type is supported by the font system.
Declaration
public void Analyse(out bool isSupportedFontType, out DWriteFontFileType fontFileType, out DWriteFontFaceType fontFaceType, out uint numberOfFaces)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | isSupportedFontType | TRUE if the font type is supported by the font system, FALSE otherwise. |
| DWriteFontFileType | fontFileType | The type of the font file. Note that even if isSupportedFontType is FALSE, the fontFileType value may be different from DWRITE_FONT_FILE_TYPE_UNKNOWN. |
| DWriteFontFaceType | fontFaceType | The type of the font face that can be constructed from the font file. Note that even if isSupportedFontType is FALSE, the fontFaceType value may be different from DWRITE_FONT_FACE_TYPE_UNKNOWN. |
| uint | numberOfFaces | Number of font faces contained in the font file. |
Remarks
IMPORTANT: certain font file types are recognized, but not supported by the font system. For example, the font system will recognize a file as a Type 1 font file, but will not be able to construct a font face object from it. In such situations, Analyze will set isSupportedFontType output parameter to FALSE.
GetReferenceKey()
Gets the reference key of a font file.
Declaration
public byte[] GetReferenceKey()
Returns
| Type | Description |
|---|---|
| byte[] |
GetReferenceKey(Span<byte>)
Gets the reference key of a font file.
Declaration
public void GetReferenceKey(Span<byte> key)
Parameters
| Type | Name | Description |
|---|---|---|
| Span<byte> | key |
GetReferenceKeySize()
Gets the reference key size of a font file.
Declaration
public uint GetReferenceKeySize()
Returns
| Type | Description |
|---|---|
| uint |