FontFallbackSettingsLoad Method (Stream)

Loads fallback settings from XML stream.

Namespace:  Aspose.Words.Fonts
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public void Load(
	Stream stream
)

Parameters

stream
Type: System.IOStream
Input stream.
Examples
Shows how to load and save font fallback settings from stream.
Document doc = new Document(MyDir + "Rendering.docx");

// By default fallback settings are initialized with predefined settings which mimics the Microsoft Word fallback
using (FileStream fontFallbackStream = new FileStream(MyDir + "Font fallback rules.xml", FileMode.Open))
{
    FontSettings fontSettings = new FontSettings();
    fontSettings.FallbackSettings.Load(fontFallbackStream);

    doc.FontSettings = fontSettings;
}

doc.Save(ArtifactsDir + "Font.LoadFontFallbackSettingsFromStream.pdf");

// Saves font fallback setting by stream
using (FileStream fontFallbackStream =
    new FileStream(ArtifactsDir + "FallbackSettings.xml", FileMode.Create))
{
    doc.FontSettings.FallbackSettings.Save(fontFallbackStream);
}
See Also