[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.DirectWrite.FontFile

Class FontFile

Namespace
GrapeCity.Documents.DX.DirectWrite
Assembly
GcDocs.DX.Windows.dll

IDWriteFontFile

[Guid("739d886a-cef5-47dc-8769-1a8b41bebbb0")]
public class FontFile : ComObject, IDisposable, IUnknown
Inheritance
object
FontFile
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

FontFile(IntPtr)

Initializes a new instance of the FontFile class.

public FontFile(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Properties

Loader

Obtains the file loader associated with a font file object.

public IFontFileLoader Loader { get; }

Property Value

IFontFileLoader

Methods

Analyze(out Bool, out FontFileType, out FontFaceType, out int)

HRESULT IDWriteFontFile::Analyze([Out] BOOL* isSupportedFontType,[Out] DWRITE_FONT_FILE_TYPE* fontFileType,[Out, Optional] DWRITE_FONT_FACE_TYPE* fontFaceType,[Out] unsigned int* numberOfFaces)

public void Analyze(out Bool isSupportedFontType, out FontFileType fontFileType, out FontFaceType fontFaceType, out int numberOfFaces)

Parameters

isSupportedFontType Bool
fontFileType FontFileType
fontFaceType FontFaceType
numberOfFaces int

Create(Factory, IntPtr, int, IFontFileLoader)

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

public static FontFile Create(Factory factory, IntPtr fontFileReferenceKey, int fontFileReferenceKeySize, IFontFileLoader fontFileLoader)

Parameters

factory Factory

A reference to a DirectWrite factory Factory

fontFileReferenceKey System.IntPtr

A font file reference key that uniquely identifies the font file resource during the lifetime of fontFileLoader.

fontFileReferenceKeySize int

The size of the font file reference key in bytes.

fontFileLoader IFontFileLoader

The font file loader that will be used by the font system to load data from the file identified by fontFileReferenceKey.

Returns

FontFile

Remarks

This function is provided for cases when an application or a document needs to use a private font without having to install it on the system. fontFileReferenceKey has to be unique only in the scope of the fontFileLoader used in this call.

Create(Factory, string, long?)

Creates a font file reference object from a local font file.

public static FontFile Create(Factory factory, string filePath, long? lastWriteTime)

Parameters

factory Factory

A reference to a DirectWrite factory Factory

filePath string

An array of characters that contains the absolute file path for the font file. Subsequent operations on the constructed object may fail if the user provided filePath doesn't correspond to a valid file on the disk.

lastWriteTime long?

The last modified time of the input file path. If the parameter is omitted, the function will access the font file to obtain its last write time. You should specify this value to avoid extra disk access. Subsequent operations on the constructed object may fail if the user provided lastWriteTime doesn't match the file on the disk.

Returns

FontFile

Create(Factory, string)

Creates a font file reference object from a local font file.

public static FontFile Create(Factory factory, string filePath)

Parameters

factory Factory

A reference to a DirectWrite factory Factory

filePath string

An array of characters that contains the absolute file path for the font file. Subsequent operations on the constructed object may fail if the user provided filePath doesn't correspond to a valid file on the disk.

Returns

FontFile

GetLoader()

HRESULT IDWriteFontFile::GetLoader([Out] IDWriteFontFileLoader** fontFileLoader)

public IFontFileLoader GetLoader()

Returns

IFontFileLoader

GetReferenceKey()

Obtains the reference to the reference key of a font file. The returned reference is valid until the font file object is released.

public DataPointer GetReferenceKey()

Returns

DataPointer

the reference to the reference key of a font file.

GetReferenceKey(IntPtr)

HRESULT IDWriteFontFile::GetReferenceKey([Out, Buffer] const void** fontFileReferenceKey,[Out] unsigned int* fontFileReferenceKeySize)

public int GetReferenceKey(IntPtr fontFileReferenceKey)

Parameters

fontFileReferenceKey System.IntPtr

Returns

int

Operators

explicit operator FontFile(IntPtr)

Performs an explicit conversion from System.IntPtr to FontFile.

public static explicit operator FontFile(IntPtr nativePointer)

Parameters

nativePointer System.IntPtr

Returns

FontFile