FontFallbackSettingsLoadMsOfficeFallbackSettings Method

Loads predefined fallback settings which mimics the Microsoft Word fallback and uses Microsoft office fonts.

Namespace:  Aspose.Words.Fonts
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public void LoadMsOfficeFallbackSettings()
Examples
Shows how to load pre-defined fallback font settings.
Document doc = new Document();

// Create a FontSettings object for our document and get its FallbackSettings attribute
FontSettings fontSettings = new FontSettings();
doc.FontSettings = fontSettings;
FontFallbackSettings fontFallbackSettings = fontSettings.FallbackSettings;

// Save the default fallback font scheme in an XML document
// For example, one of the elements has a value of "0C00-0C7F" for Range and a corresponding "Vani" value for FallbackFonts
// This means that if the font we are using does not have symbols for the 0x0C00-0x0C7F unicode block,
// the symbols from the "Vani" font will be used as a substitute
fontFallbackSettings.Save(ArtifactsDir + "Font.FallbackSettings.Default.xml");

// There are two pre-defined font fallback schemes we can choose from
// 1: Use the default Microsoft Office scheme, which is the same one as the default
fontFallbackSettings.LoadMsOfficeFallbackSettings();
fontFallbackSettings.Save(ArtifactsDir + "Font.FallbackSettings.LoadMsOfficeFallbackSettings.xml");

// 2: Use the scheme built from Google Noto fonts
fontFallbackSettings.LoadNotoFallbackSettings();
fontFallbackSettings.Save(ArtifactsDir + "Font.FallbackSettings.LoadNotoFallbackSettings.xml");
See Also