FontSourceBase.Type

FontSourceBase Type property. Returns the type of the font source.

FontSourceBase.Type property

Returns the type of the font source.

public FontSourceType Type { get; }

Examples

Demonstrates how to get the list of font sources specified in the font settings and the fonts available in each source.

private static void PrintAvaialbleFonts(FontSettings fontSettings)
{
    FontSourceBase[] fontSources = fontSettings.GetFontsSources();
    foreach (FontSourceBase fontSource in fontSources)
    {
        Console.WriteLine("----------{0}----------", fontSource.Type);
        foreach (PhysicalFontInfo pfi in fontSource.GetAvailableFonts())
        {
            Console.WriteLine(pfi.FullFontName);
        }
    }
}

See Also