Aspose::Pdf::Text::FontCollection class

FontCollection class

Represents font collection.

class FontCollection : public System::Collections::Generic::ICollection<System::SharedPtr<Aspose::Pdf::Text::Font>>

Methods

MethodDescription
Add(System::SharedPtr<Font>, System::String&)Adds new font to font resources and returns automatically assigned name of font resource.
Contains(const System::String&) constChecks if font exists in font collection.
Contains(const System::SharedPtr<Font>&) const overrideDetermines whether the collection contains a specific value.
CopyTo(System::ArrayPtr<System::SharedPtr<Font>>, int32_t) overrideCopies the entire collection to a compatible one-dimensional Array, starting at the specified index of the target array.
get_Count() const overrideGets the number of Font object elements actually contained in the collection.
get_IsReadOnly() const overrideGets a value indicating whether collection is read-only.
get_IsSynchronized()Gets a value indicating whether access to the collection is synchronized (thread safe).
get_SyncRoot() constGets an object that can be used to synchronize access to the collection.
GetEnumerator() overrideReturns an enumerator for the entire collection.
idx_get(int32_t)Gets the font element at the specified index.
idx_get(System::String)Gets font from the collection by font name. Exception is thrown if font was not found.
Remove(const System::SharedPtr<Font>&) overrideDeletes specified item from collection.

Remarks

Font collections represented by FontCollection class are used in several scenarios. For example, in resources with Resources::Fonts property.

See Also