Size
Contents
[
Hide
]Font.Size property
Gets or sets the font size in points.
public double Size { get; set; }
Examples
Shows how to format a run of text using its font property.
Document doc = new Document();
Run run = new Run(doc, "Hello world!");
Aspose.Words.Font font = run.Font;
font.Name = "Courier New";
font.Size = 36;
font.HighlightColor = Color.Yellow;
doc.FirstSection.Body.FirstParagraph.AppendChild(run);
doc.Save(ArtifactsDir + "Font.CreateFormattedRun.docx");
Shows how to insert formatted text using DocumentBuilder.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Specify font formatting, then add text.
Aspose.Words.Font font = builder.Font;
font.Size = 16;
font.Bold = true;
font.Color = Color.Blue;
font.Name = "Courier New";
font.Underline = Underline.Dash;
builder.Write("Hello world!");
See Also
- class Font
- namespace Aspose.Words
- assembly Aspose.Words