[]
        
(Showing Draft Content)

C1.Util.DX.DirectWrite.FontFile.Create

Create Method

Create(Factory, string)

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

Declaration
public static FontFile Create(Factory factory, string filePath)
Parameters
Type Name Description
Factory factory

A reference to a DirectWrite factory Factory

string filePath

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
Type Description
FontFile

Create(Factory, string, long?)

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

Declaration
public static FontFile Create(Factory factory, string filePath, long? lastWriteTime)
Parameters
Type Name Description
Factory factory

A reference to a DirectWrite factory Factory

string filePath

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.

long? lastWriteTime

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
Type Description
FontFile

Create(Factory, IntPtr, int, FontFileLoader)

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

Declaration
public static FontFile Create(Factory factory, IntPtr fontFileReferenceKey, int fontFileReferenceKeySize, FontFileLoader fontFileLoader)
Parameters
Type Name Description
Factory factory

A reference to a DirectWrite factory Factory

IntPtr fontFileReferenceKey

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

int fontFileReferenceKeySize

The size of the font file reference key in bytes.

FontFileLoader fontFileLoader

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

Returns
Type Description
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.