FontCollection

FontCollection

Overview

FontCollection is a class in Aspose.PDF FOSS for .NET. Inherits from: IEnumerable<Font>.

Collection of fonts referenced by a page.

This class declares 6 methods for FontCollection objects in .NET programs. Available methods include: Add, Contains, CopyTo, GetEnumerator, Remove. Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: Count, IsReadOnly, IsSynchronized, SyncRoot.

Properties

NameTypeAccessDescription
CountintReadGets the number of fonts in the collection.
IsReadOnlyboolReadGets the is read only.
IsSynchronizedboolReadGets the is synchronized.
SyncRootobjectReadGets the sync root.

Methods

SignatureDescription
GetEnumerator()Calls GetEnumerator on this FontCollection instance.
Contains(item: Font)Returns true when the collection contains the given font object.
Contains(name: string)Returns true when a font in the collection has the given resource name (e.g.
CopyTo(array: Font[], index: int)Copies the fonts into array, starting at the zero-based index.
Remove(item: Font)Removes the given font from this collection only (the page’s resources are not changed); returns true when it was found.
Add(newFont: Font, resName: string)Add a font and emit the PDF resource name assigned to it (e.g.

See Also

 English