Table of Contents

Class Factory3

Namespace
SharpDX.DirectWrite
Assembly
SharpDX.Direct2D1.dll
[Guid("9A1B41C3-D3BB-466A-87FC-FE67556A3B65")]
public class Factory3 : Factory2
Inheritance
Factory3
Derived
Inherited Members

Constructors

Factory3(nint)

public Factory3(nint nativePtr)

Parameters

nativePtr nint

Properties

FontDownloadQueue

Gets the font download queue associated with this factory object.

public FontDownloadQueue FontDownloadQueue { get; }

Property Value

FontDownloadQueue

SystemFontSet

Retrieves the list of system fonts.

public FontSet SystemFontSet { get; }

Property Value

FontSet

Methods

CreateCustomRenderingParams(float, float, float, float, PixelGeometry, RenderingMode1, GridFitMode, out RenderingParams3)

Creates a rendering parameters object with the specified properties.

public void CreateCustomRenderingParams(float gamma, float enhancedContrast, float grayscaleEnhancedContrast, float clearTypeLevel, PixelGeometry pixelGeometry, RenderingMode1 renderingMode, GridFitMode gridFitMode, out RenderingParams3 renderingParams)

Parameters

gamma float

The gamma value used for gamma correction, which must be greater than zero and cannot exceed 256.

enhancedContrast float

The amount of contrast enhancement, zero or greater.

grayscaleEnhancedContrast float

The amount of contrast enhancement to use for grayscale antialiasing, zero or greater.

clearTypeLevel float

The degree of ClearType level, from 0.0f (no ClearType) to 1.0f (full ClearType).

pixelGeometry PixelGeometry

A PixelGeometry-typed value that specifies the internal structure of a device pixel (that is, the physical arrangement of red, green, and blue color components) that is assumed for purposes of rendering text.

renderingMode RenderingMode1

A RenderingMode1-typed value that specifies the method (for example, ClearType natural quality) for rendering glyphs. In most cases, specify DWRITE_RENDERING_MODE1_DEFAULT to automatically use an appropriate mode.

gridFitMode GridFitMode

A GridFitMode-typed value that specifies how to grid-fit glyph outlines. In most cases, specify DWRITE_GRID_FIT_DEFAULT to automatically choose an appropriate mode.

renderingParams RenderingParams3

A reference to a memory block that receives a reference to a RenderingParams3 interface for the newly created rendering parameters object, or null in case of failure.

CreateFontCollectionFromFontSet(FontSet, out FontCollection1)

Create a weight/width/slope tree from a set of fonts.

public void CreateFontCollectionFromFontSet(FontSet fontSet, out FontCollection1 fontCollection)

Parameters

fontSet FontSet

A set of fonts to use to build the collection.

fontCollection FontCollection1

Holds the newly created font collection object, or null in case of failure.

CreateFontFaceReference(FontFile, int, FontSimulations, out FontFaceReference)

Creates a reference to a font given a full path.

public void CreateFontFaceReference(FontFile fontFile, int faceIndex, FontSimulations fontSimulations, out FontFaceReference fontFaceReference)

Parameters

fontFile FontFile

Absolute file path. Subsequent operations on the constructed object may fail if the user provided filePath doesn't correspond to a valid file on the disk.

faceIndex int

The zero based index of a font face in cases when the font files contain a collection of font faces. If the font files contain a single face, this value should be zero.

fontSimulations FontSimulations

Font face simulation flags for algorithmic emboldening and italicization.

fontFaceReference FontFaceReference

Contains newly created font face reference object, or nullptr in case of failure.

CreateFontFaceReference(string, long?, int, FontSimulations, out FontFaceReference)

Creates a reference to a font given a full path.

public void CreateFontFaceReference(string filePath, long? lastWriteTime, int faceIndex, FontSimulations fontSimulations, out FontFaceReference fontFaceReference)

Parameters

filePath string

Absolute file path. 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?

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, so the clients are encouraged to 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.

faceIndex int

The zero based index of a font face in cases when the font files contain a collection of font faces. If the font files contain a single face, this value should be zero.

fontSimulations FontSimulations

Font face simulation flags for algorithmic emboldening and italicization.

fontFaceReference FontFaceReference

Contains newly created font face reference object, or nullptr in case of failure.

CreateFontSetBuilder(out FontSetBuilder)

Creates an empty font set builder to add font face references and create a custom font set.

public void CreateFontSetBuilder(out FontSetBuilder fontSetBuilder)

Parameters

fontSetBuilder FontSetBuilder

Holds the newly created font set builder object, or null in case of failure.

CreateGlyphRunAnalysis(GlyphRun, RawMatrix3x2?, RenderingMode1, MeasuringMode, GridFitMode, TextAntialiasMode, float, float, out GlyphRunAnalysis)

Creates a glyph-run-analysis object that encapsulates info that DirectWrite uses to render a glyph run.

public void CreateGlyphRunAnalysis(GlyphRun glyphRun, RawMatrix3x2? transform, RenderingMode1 renderingMode, MeasuringMode measuringMode, GridFitMode gridFitMode, TextAntialiasMode antialiasMode, float baselineOriginX, float baselineOriginY, out GlyphRunAnalysis glyphRunAnalysis)

Parameters

glyphRun GlyphRun

No documentation.

transform RawMatrix3x2?

No documentation.

renderingMode RenderingMode1

No documentation.

measuringMode MeasuringMode

No documentation.

gridFitMode GridFitMode

No documentation.

antialiasMode TextAntialiasMode

No documentation.

baselineOriginX float

No documentation.

baselineOriginY float

No documentation.

glyphRunAnalysis GlyphRunAnalysis

No documentation.

GetSystemFontCollection(RawBool, out FontCollection1, RawBool)

Retrieves a weight/width/slope tree of system fonts.

public void GetSystemFontCollection(RawBool includeDownloadableFonts, out FontCollection1 fontCollection, RawBool checkForUpdates)

Parameters

includeDownloadableFonts RawBool

If this parameter is TRUE, the function performs an immediate check for changes to the set of system fonts. If this parameter is SharpDX.Result.False, the function will still detect changes if the font cache service is running, but there may be some latency. For example, an application might specify TRUE if it has just installed a font and wants to be sure the font collection contains that font.

fontCollection FontCollection1

Holds the newly created font collection object, or null in case of failure.

checkForUpdates RawBool

If this parameter is TRUE, the function performs an immediate check for changes to the set of system fonts. If this parameter is SharpDX.Result.False, the function will still detect changes if the font cache service is running, but there may be some latency. For example, an application might specify TRUE if it has just installed a font and wants to be sure the font collection contains that font.

Operators

explicit operator Factory3(nint)

public static explicit operator Factory3(nint nativePtr)

Parameters

nativePtr nint

Returns

Factory3