FontInfoCollectionContains Method

Determines whether the collection contains a font with the given name.

Namespace:  Aspose.Words.Fonts
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public bool Contains(
	string name
)

Parameters

name
Type: SystemString
Case-insensitive name of the font to locate.

Return Value

Type: Boolean
True if the item is found in the collection; otherwise, false.
Examples
Shows info about the fonts that are present in the blank document.
// Create a new document
Document doc = new Document();
// A blank document comes with 3 fonts
Assert.AreEqual(3, doc.FontInfos.Count);
Assert.AreEqual(true, doc.FontInfos.Contains("Times New Roman"));
Assert.AreEqual(true, doc.FontInfos.Contains("Symbol"));
Assert.AreEqual(true, doc.FontInfos.Contains("Arial"));
See Also