Class DWriteFontFile
The interface that represents a reference to a font file.
Inherited Members
Namespace: JeremyAnsel.DirectX.DWrite
Assembly: JeremyAnsel.DirectX.DWrite.dll
Syntax
public sealed class DWriteFontFile : IDisposable, IDWriteReleasable
Properties
| Edit this page View SourceHandle
Gets an handle representing the DWrite object interface.
Declaration
public object Handle { get; }
Property Value
Type | Description |
---|---|
object |
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.
Dispose()
Immediately releases the unmanaged resources used by the DWrite object.
Declaration
public void Dispose()
GetReferenceKey()
Gets the reference key of a font file.
Declaration
public byte[] GetReferenceKey()
Returns
Type | Description |
---|---|
byte[] |
Release()
Releases the managed reference to the COM DWrite interface.
Declaration
public void Release()
ToBoolean()
Gets a boolean indicating if the handle is not null.
Declaration
public bool ToBoolean()
Returns
Type | Description |
---|---|
bool | A boolean |
Operators
| Edit this page View Sourceimplicit operator bool(DWriteFontFile)
Gets a boolean indicating if the handle is not null.
Declaration
public static implicit operator bool(DWriteFontFile value)
Parameters
Type | Name | Description |
---|---|---|
DWriteFontFile | value | A DWrite object. |
Returns
Type | Description |
---|---|
bool | A boolean |