UpdateAmbiguousTextFont
SaveOptions.UpdateAmbiguousTextFont property
Determines whether the font attributes will be changed according to the character code being used.
public bool UpdateAmbiguousTextFont { get; set; }
Examples
Shows how to update the font to match the character code being used.
Document doc = new Document(MyDir + "Special symbol.docx");
Run run = doc.FirstSection.Body.FirstParagraph.Runs[0];
Console.WriteLine(run.Text); // ฿
Console.WriteLine(run.Font.Name); // Arial
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions();
saveOptions.UpdateAmbiguousTextFont = true;
doc.Save(ArtifactsDir + "OoxmlSaveOptions.UpdateAmbiguousTextFont.docx", saveOptions);
doc = new Document(ArtifactsDir + "OoxmlSaveOptions.UpdateAmbiguousTextFont.docx");
run = doc.FirstSection.Body.FirstParagraph.Runs[0];
Console.WriteLine(run.Text); // ฿
Console.WriteLine(run.Font.Name); // Angsana New
See Also
- class SaveOptions
- namespace Aspose.Words.Saving
- assembly Aspose.Words