NumSpacing

NumSpacing enumeration

Specifies possible values in which numeral spacing can be displayed.

public enum NumSpacing

Values

NameValueDescription
Default0Specifies that numerals are displayed in the font’s default form.
Proportional1Specifies that the forms of the numerals designed as proportionally spaced are displayed if supported by the font.
Tabular2Specifies that the forms of the numerals designed as tabular are displayed if supported by the font.

Examples

Shows how to set the spacing type of the numeral.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// This effect is only supported in newer versions of MS Word.
doc.CompatibilityOptions.OptimizeFor(MsWordVersion.Word2019);

builder.Write("1 ");
builder.Write("This is an example");

Run run = doc.FirstSection.Body.FirstParagraph.Runs[0];
if (run.Font.NumberSpacing == NumSpacing.Default)
    run.Font.NumberSpacing = NumSpacing.Proportional;

doc.Save(ArtifactsDir + "Fonts.NumberSpacing.docx");

See Also