UpdateAmbiguousTextFont
SaveOptions.UpdateAmbiguousTextFont property
Avgör om teckensnittsattributen ska ändras beroende på den teckenkod som används.
public bool UpdateAmbiguousTextFont { get; set; }
Exempel
Visar hur man uppdaterar teckensnittet så att det matchar den teckenkod som används.
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
Se även
- class SaveOptions
- namnutrymme Aspose.Words.Saving
- hopsättning Aspose.Words