Class FontFaceReference
- Namespace
- SharpDX.DirectWrite
- Assembly
- SharpDX.Direct2D1.dll
[Guid("5E7FA7CA-DDE3-424C-89F0-9FCD6FED58CD")]
public class FontFaceReference : ComObject
- Inheritance
-
FontFaceReference
Constructors
FontFaceReference(nint)
public FontFaceReference(nint nativePtr)
Parameters
nativePtr
nint
Properties
FileSize
Get the total size of the font face in bytes.
public long FileSize { get; }
Property Value
FileTime
Get the last modified date.
public long FileTime { get; }
Property Value
FontFaceIndex
Obtains the zero-based index of the font face in its font file or files. If the font files contain a single face, the return value is zero.
public int FontFaceIndex { get; }
Property Value
FontFile
Obtains the font file representing a font face.
public FontFile FontFile { get; }
Property Value
LocalFileSize
Get the local size of the font face in bytes, which will always be less than or equal to GetFullSize. If the locality is remote, this value is zero. If full, this value will equal GetFileSize.
public long LocalFileSize { get; }
Property Value
Locality
Get the locality of this font face reference.
public Locality Locality { get; }
Property Value
Remarks
You can always successfully create a font face from a fully local font. Attempting to create a font face on a remote or partially local font may fail with DWRITE_E_REMOTEFONT. This function may change between calls depending on background downloads and whether cached data expires.
Simulations
Obtains the algorithmic style simulation flags of a font face.
public FontSimulations Simulations { get; }
Property Value
Methods
CreateFontFace(out FontFace3)
Creates a font face from the reference for use with layout, shaping, or rendering.
public void CreateFontFace(out FontFace3 fontFace)
Parameters
fontFace
FontFace3Newly created font face object, or nullptr in the case of failure.
Remarks
This function can fail with DWRITE_E_REMOTEFONT if the font is not local.
CreateFontFaceWithSimulations(FontSimulations, out FontFace3)
Creates a font face with alternate font simulations, for example, to explicitly simulate a bold font face out of a regular variant.
public void CreateFontFaceWithSimulations(FontSimulations fontFaceSimulationFlags, out FontFace3 fontFace)
Parameters
fontFaceSimulationFlags
FontSimulationsFont face simulation flags for algorithmic emboldening and italicization.
fontFace
FontFace3Newly created font face object, or nullptr in the case of failure.
Remarks
This function can fail with DWRITE_E_REMOTEFONT if the font is not local.
EnqueueCharacterDownloadRequest(string, int)
Adds a request to the font download queue (FontDownloadQueue).
public void EnqueueCharacterDownloadRequest(string characters, int characterCount)
Parameters
Remarks
Downloading a character involves downloading every glyph it depends on directly or indirectly, via font tables (cmap, GSUB, COLR, glyf).
EnqueueFileFragmentDownloadRequest(long, long)
Adds a request to the font download queue (FontDownloadQueue).
public void EnqueueFileFragmentDownloadRequest(long fileOffset, long fragmentSize)
Parameters
EnqueueFontDownloadRequest()
Adds a request to the font download queue (FontDownloadQueue).
public void EnqueueFontDownloadRequest()
EnqueueGlyphDownloadRequest(short[], int)
Adds a request to the font download queue (FontDownloadQueue).
public void EnqueueGlyphDownloadRequest(short[] glyphIndices, int glyphCount)
Parameters
Remarks
Downloading a glyph involves downloading any other glyphs it depends on from the font tables (GSUB, COLR, glyf).
Equals(FontFaceReference)
No documentation.
public RawBool Equals(FontFaceReference fontFaceReference)
Parameters
fontFaceReference
FontFaceReferenceNo documentation.
Returns
- RawBool
No documentation.
Operators
explicit operator FontFaceReference(nint)
public static explicit operator FontFaceReference(nint nativePtr)
Parameters
nativePtr
nint