FontSubscript Property |
Namespace: Aspose.Words
// Create an empty document. It contains one empty paragraph Document doc = new Document(); // Get the paragraph from the document, we will be adding runs of text to it Paragraph para = (Paragraph) doc.GetChild(NodeType.Paragraph, 0, true); // Add a run of text that is raised 5 points above the baseline Run run = new Run(doc, "Raised text"); run.Font.Position = 5; para.AppendChild(run); // Add a run of normal text run = new Run(doc, "Normal text"); para.AppendChild(run); // Add a run of text that appears as subscript run = new Run(doc, "Subscript"); run.Font.Subscript = true; para.AppendChild(run); // Add a run of text that appears as superscript run = new Run(doc, "Superscript"); run.Font.Superscript = true; para.AppendChild(run);