FontSourceBaseGetAvailableFonts Method

Returns list of fonts available via this source.

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

Syntax

public IList<PhysicalFontInfo> GetAvailableFonts()

Return Value

Type: IListPhysicalFontInfo

Examples

Shows how to get available fonts and information about them.
// Add a new folder source which will instruct Aspose.Words to search the following folder for fonts
FontSourceBase[] folderFontSource = { new FolderFontSource(FontsDir, true) };

foreach (PhysicalFontInfo fontInfo in folderFontSource[0].GetAvailableFonts())
{
    Console.WriteLine("FontFamilyName : {0}", fontInfo.FontFamilyName);
    Console.WriteLine("FullFontName  : {0}", fontInfo.FullFontName);
    Console.WriteLine("Version  : {0}", fontInfo.Version);
    Console.WriteLine("FilePath : {0}\n", fontInfo.FilePath);
}

See Also