FontFallbackSettingsLoadMsOfficeFallbackSettings Method |
Namespace: Aspose.Words.Fonts
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");