i need to display all the fonts contained in the docx file.
example: In my file has 3 lines of font : calibri , Times New Roman, Arial
.
I use this code but it only shows the first font it encounters:
import docx
doc = Document('path of file docx')
par = doc.paragraphs[0]
print(f"'{par.style.font.name}'")
print(f"'{par.runs[0].font.name}'")