FontSettings.GetFontsSources
FontSettings GetFontsSources method. Gets a copy of the array that contains the list of sources where Wordize looks for TrueType fonts.
FontSettings.GetFontsSources method
Gets a copy of the array that contains the list of sources where Wordize looks for TrueType fonts.
public FontSourceBase[] GetFontsSources()
Return Value
A copy of the current font sources.
Remarks
The returned value is a copy of the data that Wordize uses. If you change the entries in the returned array, it will have no effect on document rendering. To specify new font sources use the SetFontsSources
method.
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
- class FontSourceBase
- class FontSettings
- namespace Wordize.Fonts
- assembly Wordize