FontFamily Enumeration

Represents the font family.

Namespace:  Aspose.Words.Fonts
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.7.0


public enum FontFamily


  Member nameValueDescription
Auto0 Specifies a generic family name. This name is used when information about a font does not exist or does not matter. The default font is used.
Roman1 Specifies a proportional font with serifs. An example is Times New Roman.
Swiss2 Specifies a proportional font without serifs. An example is Arial.
Modern3 Specifies a monospace font with or without serifs. Monospace fonts are usually modern; examples include Pica, Elite, and Courier New.
Script4 Specifies a font that is designed to look like handwriting; examples include Script and Cursive.
Decorative5 Specifies a novelty font. An example is Old English.


A font family is a set of fonts having common stroke width and serif characteristics.


Shows how to get information about each font in a document.
Document doc = new Document(MyDir + "Document.docx");

// We can iterate over all the fonts with an enumerator
IEnumerator fontCollectionEnumerator = doc.FontInfos.GetEnumerator();
// Print detailed information about each font to the console
while (fontCollectionEnumerator.MoveNext())
    FontInfo fontInfo = (FontInfo)fontCollectionEnumerator.Current;
    if (fontInfo != null)
        Console.WriteLine("Font name: " + fontInfo.Name);
        // Alt names are usually blank
        Console.WriteLine("Alt name: " + fontInfo.AltName);
        Console.WriteLine("\t- Family: " + fontInfo.Family);
        Console.WriteLine("\t- " + (fontInfo.IsTrueType ? "Is TrueType" : "Is not TrueType"));
        Console.WriteLine("\t- Pitch: " + fontInfo.Pitch);
        Console.WriteLine("\t- Charset: " + fontInfo.Charset);
        Console.WriteLine("\t- Panose:");
        Console.WriteLine("\t\tFamily Kind: " + fontInfo.Panose[0]);
        Console.WriteLine("\t\tSerif Style: " + fontInfo.Panose[1]);
        Console.WriteLine("\t\tWeight: " + fontInfo.Panose[2]);
        Console.WriteLine("\t\tProportion: " + fontInfo.Panose[3]);
        Console.WriteLine("\t\tContrast: " + fontInfo.Panose[4]);
        Console.WriteLine("\t\tStroke Variation: " + fontInfo.Panose[5]);
        Console.WriteLine("\t\tArm Style: " + fontInfo.Panose[6]);
        Console.WriteLine("\t\tLetterform: " + fontInfo.Panose[7]);
        Console.WriteLine("\t\tMidline: " + fontInfo.Panose[8]);
        Console.WriteLine("\t\tX-Height: " + fontInfo.Panose[9]);

See Also