count property

FontInfoCollection.count property

Gets the number of elements contained in the collection.

def count(self) -> int:


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)
self.assertTrue(doc.font_infos.contains('Times New Roman'))
self.assertEqual(204, doc.font_infos.get_by_name('Times New Roman').charset)

See Also