FontRepository.GetFonts() Method
Returns a list of all fonts in FontRepository.
Namespace: DevExpress.Office
Assembly: DevExpress.Office.v22.1.Core.dll
NuGet Package: DevExpress.Office.Core
Declaration
Returns
Type | Description |
---|---|
IList<FontData> | A list of FontData objects that contain information about fonts in the repository. |
Example
The following code sample retrieves the names of all fonts in the repository and displays this information in the console window:
using DevExpress.Office;
using System;
using System.Collections.Generic;
// ...
if (FontRepository.Instance.IsEmpty)
Console.WriteLine("Font repository is empty.");
else
{
Console.WriteLine("Font repository contains the following fonts:");
IList<FontData> fonts = FontRepository.Instance.GetFonts();
for (int i = 0; i < fonts.Count; i++)
{
Console.WriteLine($" \u002A {fonts[i].Name}");
}
}
The following image demonstrates a sample console output:
See Also