Table of Contents

Class FontSetBuilder

Namespace
SharpDX.DirectWrite
Assembly
SharpDX.Direct2D1.dll
[Guid("2F642AFE-9C68-4F40-B8BE-457401AFCB3D")]
public class FontSetBuilder : ComObject
Inheritance
FontSetBuilder
Derived

Constructors

FontSetBuilder(nint)

public FontSetBuilder(nint nativePtr)

Parameters

nativePtr nint

Methods

AddFontFaceReference(FontFaceReference)

Adds a reference to a font to the set being built. The caller supplies enough information to search on, avoiding the need to open the potentially non-local font. Any properties not supplied by the caller will be missing, and those properties will not be available as filters in GetMatchingFonts. GetPropertyValues for missing properties will return an empty string list. The properties passed should generally be consistent with the actual font contents, but they need not be. You could, for example, alias a font using a different name or unique identifier, or you could set custom tags not present in the actual font.

public void AddFontFaceReference(FontFaceReference fontFaceReference)

Parameters

fontFaceReference FontFaceReference

Reference to the font.

AddFontFaceReference(FontFaceReference, FontProperty[], int)

Adds a reference to a font to the set being built. The caller supplies enough information to search on, avoiding the need to open the potentially non-local font. Any properties not supplied by the caller will be missing, and those properties will not be available as filters in GetMatchingFonts. GetPropertyValues for missing properties will return an empty string list. The properties passed should generally be consistent with the actual font contents, but they need not be. You could, for example, alias a font using a different name or unique identifier, or you could set custom tags not present in the actual font.

public void AddFontFaceReference(FontFaceReference fontFaceReference, FontProperty[] ropertiesRef, int propertyCount)

Parameters

fontFaceReference FontFaceReference

Reference to the font.

ropertiesRef FontProperty[]

List of properties to associate with the reference.

propertyCount int

The number of properties defined.

AddFontSet(FontSet)

Appends an existing font set to the one being built, allowing one to aggregate two sets or to essentially extend an existing one.

public void AddFontSet(FontSet fontSet)

Parameters

fontSet FontSet

Font set to append font face references from.

CreateFontSet(out FontSet)

Creates a font set from all the font face references added so far with AddFontFaceReference.

public void CreateFontSet(out FontSet fontSet)

Parameters

fontSet FontSet

Contains the newly created font set object, or nullptr in case of failure.

Remarks

Creating a font set takes less time if the references were added with metadata rather than needing to extract the metadata from the font file.

Operators

explicit operator FontSetBuilder(nint)

public static explicit operator FontSetBuilder(nint nativePtr)

Parameters

nativePtr nint

Returns

FontSetBuilder