count property
FontInfoCollection.count property
Gets the number of elements contained in the collection.
@property
def count(self) -> int:
...
Examples
Shows info about the fonts that are present in the blank document.
doc = aw.Document()
# A blank document contains 3 default fonts. Each font in the document
# will have a corresponding FontInfo object which contains details about that font.
self.assertEqual(3, doc.font_infos.count)
font_names = [font.name for font in doc.font_infos]
self.assertIn("Times New Roman", font_names)
self.assertEqual(204, doc.font_infos.get_by_name("Times New Roman").charset)
self.assertIn("Symbol", font_names)
self.assertIn("Arial", font_names)
See Also
- module aspose.words.fonts
- class FontInfoCollection