Font.SmallCaps property

True if the font is formatted as small capital letters.

public bool SmallCaps { get; set; }


Shows how to format a run to display its contents in capitals.

Document doc = new Document();
Paragraph para = (Paragraph)doc.GetChild(NodeType.Paragraph, 0, true);

// There are two ways of getting a run to display its lowercase text in uppercase without changing the contents.
// 1 -  Set the AllCaps flag to display all characters in regular capitals:
Run run = new Run(doc, "all capitals");
run.Font.AllCaps = true;

para = (Paragraph)para.ParentNode.AppendChild(new Paragraph(doc));

// 2 -  Set the SmallCaps flag to display all characters in small capitals:
// If a character is lower case, it will appear in its upper case form
// but will have the same height as the lower case (the font's x-height).
// Characters that were in upper case originally will look the same.
run = new Run(doc, "Small Capitals");
run.Font.SmallCaps = true;

doc.Save(ArtifactsDir + "Font.Caps.docx");

See Also