[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.Font

Class Font

Namespace
GrapeCity.Documents.Word
Assembly
GcDocs.Word.dll

Represents font attributes (font name, size, color, and so on) for an object.

public class Font : FontBase
Inheritance
object
Font
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

ContextualAlternates

Gets or sets a value indicating whether contextual alternates are enabled for the font.

public bool ContextualAlternates { get; set; }

Property Value

bool

Remarks

Contextual alternates are ligatures that are applied to individual characters based on the letters around them (their context). Contextual alternates can also be applied to entire words in certain contexts, for example, words frequently used in titles (such as "of" and "the"). When contextual alternates are enabled for a font, they are used instead of the standard ligatures in those contexts defined by the font designer.

Effects

Gets the text effects formatting properties.

public TextEffects Effects { get; }

Property Value

TextEffects

Fill

Gets the fill formatting properties.

public FillFormat Fill { get; }

Property Value

FillFormat

HighlightColor

Gets or sets the highlight (marker) color.

public HighlightColor HighlightColor { get; set; }

Property Value

HighlightColor

Ligatures

Gets or sets ligatures that are two or more glyphs that are represented by what appears to the reader as a single character in order to create more readable or attractive text.

public Ligatures Ligatures { get; set; }

Property Value

Ligatures

Line

Gets the outline text effect formatting properties.

public LineFormatBase Line { get; }

Property Value

LineFormatBase

NumberForm

Gets or sets the number form setting for an OpenType font.

public NumberForm NumberForm { get; set; }

Property Value

NumberForm

Remarks

Numbers in OpenType fonts can be displayed either with consistent heights along the baseline of the text (called "lining"), or with varying heights (called "hanging" or "old style") where numbers are displayed above or below the baseline of the text. Use the NumberForm property to specify whether numbers are displayed using lining or old-style.

NumberSpacing

Gets or sets the number spacing setting for a font.

public NumberSpacing NumberSpacing { get; set; }

Property Value

NumberSpacing

Remarks

OpenType fonts support a proportional and tabular figure feature to control number spacing. Proportional number spacing handles each number as having a different width. For example, "1" is displayed as narrower than "5". Tabular number spacing handles numbers as equal in width so that they align vertically, which increases the readability, especially for financial information.

RightToLeft

Gets or sets a value indicating whether the contents shall have right-to-left characteristics.

public bool RightToLeft { get; set; }

Property Value

bool

Remarks

This property, when on, shall not be used with strongly left-to-right text. Any behavior under that condition is unspecified. This property, when off, shall not be used with strong right-to-left text. Any behavior under that condition is unspecified. When the contents of this run are displayed, all characters shall be treated as complex script characters for formatting purposes. This means that BoldBi, ItalicBi, SizeBi and a corresponding font name will be used when rendering the content.

StylisticSets

Gets or sets the stylistic set for the specified font.

public StylisticSets StylisticSets { get; set; }

Property Value

StylisticSets

Remarks

Some OpenType fonts provide stylistic sets. A stylistic set defines a set of characters within the font that are intended to be used together, usually for the purpose of visual harmony, such as in headings.

Methods

ApplyEffectsPreset(FontEffectsPreset)

Applies a built-in font effects preset.

public void ApplyEffectsPreset(FontEffectsPreset preset)

Parameters

preset FontEffectsPreset

The FontEffectsPreset to apply.

ClearFormatting()

Resets to default font formatting.

public override void ClearFormatting()

Remarks

Removes all font formatting specified explicitly on the object from which Font was obtained so the font formatting will be inherited from the appropriate parent.