[]
Creates a font file reference object from a local font file.
public static FontFile Create(Factory factory, string filePath)
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. |
Type | Description |
---|---|
FontFile |
Creates a font file reference object from a local font file.
public static FontFile Create(Factory factory, string filePath, long? lastWriteTime)
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. |
Type | Description |
---|---|
FontFile |
Creates a reference to an application-specific font file resource.
public static FontFile Create(Factory factory, IntPtr fontFileReferenceKey, int fontFileReferenceKeySize, FontFileLoader fontFileLoader)
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. |
Type | Description |
---|---|
FontFile |
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.