[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.DirectWrite.FontCollection

Class FontCollection

Namespace
GrapeCity.Documents.DX.DirectWrite
Assembly
GcDocs.DX.Windows.dll

IDWriteFontCollection

[Guid("a84cee02-3eea-4eee-a827-87c1a02a0fcc")]
public class FontCollection : ComObject, IDisposable, IUnknown
Inheritance
object
FontCollection
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

FontCollection(IntPtr)

Initializes a new instance of the FontCollection class.

public FontCollection(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Methods

Create(Factory, IFontCollectionLoader, DataPointer)

Creates a font collection using a custom font collection loader.

public static FontCollection Create(Factory factory, IFontCollectionLoader collectionLoader, DataPointer collectionKey)

Parameters

factory Factory

A reference to a DirectWrite factory Factory

collectionLoader IFontCollectionLoader

An application-defined font collection loader, which must have been previously registered using GrapeCity.Documents.DX.DirectWrite.Factory.RegisterFontCollectionLoader_(System.IntPtr).

collectionKey DataPointer

The key used by the loader to identify a collection of font files. The buffer allocated for this key should at least be the size of collectionKeySize.

Returns

FontCollection

FindFamilyName(string, out int)

HRESULT IDWriteFontCollection::FindFamilyName([In] const wchar_t* familyName,[Out] unsigned int* index,[Out] BOOL* exists)

public bool FindFamilyName(string familyName, out int index)

Parameters

familyName string
index int

Returns

bool

GetFontFamily(int, out FontFamily)

HRESULT IDWriteFontCollection::GetFontFamily([In] unsigned int index,[Out] IDWriteFontFamily** fontFamily)

public HResult GetFontFamily(int index, out FontFamily fontFamily)

Parameters

index int
fontFamily FontFamily

Returns

HResult

GetFontFamily(int)

HRESULT IDWriteFontCollection::GetFontFamily([In] unsigned int index,[Out] IDWriteFontFamily** fontFamily)

public FontFamily GetFontFamily(int index)

Parameters

index int

Returns

FontFamily

GetFontFamilyCount()

unsigned int IDWriteFontCollection::GetFontFamilyCount()

public int GetFontFamilyCount()

Returns

int

GetFontFromFontFace(FontFace)

HRESULT IDWriteFontCollection::GetFontFromFontFace([In] IDWriteFontFace* fontFace,[Out] IDWriteFont** font)

public Font GetFontFromFontFace(FontFace fontFace)

Parameters

fontFace FontFace

Returns

Font

Operators

explicit operator FontCollection(IntPtr)

Performs an explicit conversion from System.IntPtr to FontCollection.

public static explicit operator FontCollection(IntPtr nativePointer)

Parameters

nativePointer System.IntPtr

Returns

FontCollection