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
Syntaxpublic bool Contains(
string name
)
Public Function Contains (
name As String
) As Boolean
public:
bool Contains(
String^ name
)
member Contains :
name : string -> bool
Parameters
- name
- Type: SystemString
Case-insensitive name of the font to locate.
Return Value
Type:
BooleanTrue if the item is found in the collection; otherwise, false.
ExamplesShows info about the fonts that are present in the blank document.
Document doc = new Document();
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