public void SetFontsFoldersMultipleFolders()
{
// Store the font sources currently used so we can restore them later.
FontSourceBase[] fontSources = FontSettings.DefaultInstance.GetFontsSources();
//ExStart
//ExFor:FontSettings
//ExFor:FontSettings.SetFontsFolders(String[], Boolean)
//ExId:SetFontsFoldersMultipleFolders
//ExSummary:Demonstrates how to set Aspose.Words to look in multiple folders for TrueType fonts when rendering or embedding fonts.
Document doc = new Document(MyDir + "Rendering.doc");
// Note that this setting will override any default font sources that are being searched by default. Now only these folders will be searched for
// fonts when rendering or embedding fonts. To add an extra font source while keeping system font sources then use both FontSettings.GetFontSources and
// FontSettings.SetFontSources instead.
FontSettings.DefaultInstance.SetFontsFolders(new string[] {@"C:\MyFonts\", @"D:\Misc\Fonts\"}, true);
doc.Save(MyDir + @"\Artifacts\Rendering.SetFontsFolders.pdf");
//ExEnd
// Restore the original sources used to search for fonts.
FontSettings.DefaultInstance.SetFontsSources(fontSources);
}