FontInfoName Property

Gets the name of the font.

Namespace:  Aspose.Words.Fonts
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public string Name { get; }

Property Value

Type: String
Remarks

Cannot be null. Can be an empty string.

Examples
Shows how to gather the details of what fonts are present in a document.
Document doc = new Document(MyDir + "Document.docx");

FontInfoCollection fonts = doc.FontInfos;
int fontIndex = 1;

// The fonts info extracted from this document does not necessarily mean that the fonts themselves are
// used in the document. If a font is present but not used then most likely they were referenced at some time
// and then removed from the Document
foreach (FontInfo info in fonts)
{
    // Print out some important details about the font
    Console.WriteLine("Font #{0}", fontIndex);
    Console.WriteLine("Name: {0}", info.Name);
    Console.WriteLine("IsTrueType: {0}", info.IsTrueType);
    fontIndex++;
}
See Also