[]
IDWriteFontCollection
[Guid("a84cee02-3eea-4eee-a827-87c1a02a0fcc")]
public class FontCollection : ComObject, IDisposable, IUnknown
Initializes a new instance of the FontCollection class.
public FontCollection(IntPtr nativePtr)
nativePtr
System.IntPtrThe native pointer.
Creates a font collection using a custom font collection loader.
public static FontCollection Create(Factory factory, IFontCollectionLoader collectionLoader, DataPointer collectionKey)
factory
FactoryA reference to a DirectWrite factory Factory
collectionLoader
IFontCollectionLoaderAn application-defined font collection loader, which must have been previously registered using GrapeCity.Documents.DX.DirectWrite.Factory.RegisterFontCollectionLoader_(System.IntPtr).
collectionKey
DataPointerThe 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.
HRESULT IDWriteFontCollection::FindFamilyName([In] const wchar_t* familyName,[Out] unsigned int* index,[Out] BOOL* exists)
public bool FindFamilyName(string familyName, out int index)
familyName
stringindex
intHRESULT IDWriteFontCollection::GetFontFamily([In] unsigned int index,[Out] IDWriteFontFamily** fontFamily)
public HResult GetFontFamily(int index, out FontFamily fontFamily)
index
intfontFamily
FontFamilyHRESULT IDWriteFontCollection::GetFontFamily([In] unsigned int index,[Out] IDWriteFontFamily** fontFamily)
public FontFamily GetFontFamily(int index)
index
intunsigned int IDWriteFontCollection::GetFontFamilyCount()
public int GetFontFamilyCount()
HRESULT IDWriteFontCollection::GetFontFromFontFace([In] IDWriteFontFace* fontFace,[Out] IDWriteFont** font)
public Font GetFontFromFontFace(FontFace fontFace)
fontFace
FontFacePerforms an explicit conversion from System.IntPtr to FontCollection.
public static explicit operator FontCollection(IntPtr nativePointer)
nativePointer
System.IntPtr