[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.FontBase

Class FontBase

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

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

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

Properties

AllCaps

Gets or sets a value indicating whether the font is formatted as all capital letters.

public bool AllCaps { get; set; }

Property Value

bool

AlwaysHidden

Gets or sets a value indicating whether the given run shall always behave as if it is hidden, even when hidden text is being displayed in the current document.

public bool AlwaysHidden { get; set; }

Property Value

bool

Remarks

This property shall only be used to specify that a paragraph mark shall never be used to break the end of a paragraph for display, even if it is being shown on the document, as would be the case if a regularly hidden paragraph was not being displayed in the document. This property was typically used to ensure that a paragraph style can be applied to a part of a paragraph, and still appear as in the Table of Contents (which in previous word processors would ignore the use of the style if it were being used as a character style. If this font property is applied to any other run, it can be ignored.

Animation

Gets or sets the font animation effect.

public TextAnimation Animation { get; set; }

Property Value

TextAnimation

BaseKey

Gets the base (this class) key for formatting properties.

protected override string BaseKey { get; }

Property Value

string

Bidi

Gets or sets a value indicating whether the contents shall be treated as complex script text regardless of their Unicode character values when determining the formatting. This means that a consumer shall use the complex script formatting (e.g. BoldBi, ItalicBi...) applied by this font when determining the resulting formatting properties.

public bool Bidi { get; set; }

Property Value

bool

Bold

Gets or sets a value indicating whether the font is formatted as bold.

public bool Bold { get; set; }

Property Value

bool

BoldBi

Gets or sets whether the bold property shall be applied to all complex script characters in the contents when displayed in a document.

public bool BoldBi { get; set; }

Property Value

bool

Border

Gets the Border object that specifies borders for the font.

public Border Border { get; }

Property Value

Border

Color

Gets the color of the font.

public WordColor Color { get; }

Property Value

WordColor

DisableCharacterSpaceGrid

Gets or sets a value indicating whether the current run should use the document grid characters per line settings defined in the Document.Grid property when laying out the contents in this run. This setting determines whether the additional character pitch specified in the document grid shall be added to each character in this run as specified by the document grid.

public bool DisableCharacterSpaceGrid { get; set; }

Property Value

bool

DoubleStrikeThrough

Gets or sets a value indicating whether the font is formatted as double strikethrough text.

public bool DoubleStrikeThrough { get; set; }

Property Value

bool

EastAsianLayout

Gets East Asian typography settings which shall be applied to the contents of the run.

public EastAsianLayout EastAsianLayout { get; }

Property Value

EastAsianLayout

Emboss

Gets or sets a value indicating whether the font is formatted as embossed.

public bool Emboss { get; set; }

Property Value

bool

EmphasisMark

Gets or sets a EmphasisMark constant that represents the emphasis mark for a character or designated character string.

public EmphasisMark EmphasisMark { get; set; }

Property Value

EmphasisMark

Engrave

Gets or sets a value indicating whether the font is formatted as engraved.

public bool Engrave { get; set; }

Property Value

bool

FitTextId

Gets or sets a unique ID which shall be used to link multiple contiguous runs with specified FitTextWidth property to each other to ensure that their contents are correctly merged into the specified width in the document. This means that multiple runs which are broken apart due to differences in formatting can be identified as belonging to the same grouping in terms of FitText properties, although they are multiple runs of text in the document.

public int FitTextId { get; set; }

Property Value

int

Remarks

If this property value equals to 0, then the run has no id and shall not be linked with any other run in the parent paragraph.

FitTextWidth

Gets or sets that the contents of the run shall not be automatically displayed based on the width of its contents, rather its contents shall be resized to fit the width specified by the this property. This expansion/contraction shall be performed by equally increasing/decreasing the size of each character in the run's contents when displayed.

public float FitTextWidth { get; set; }

Property Value

float

Remarks

If the property value equals to 0, then the contents of the run shall be displayed based on the size of its contents.

Hidden

Gets or sets a value indicating whether the font is formatted as hidden text.

public bool Hidden { get; set; }

Property Value

bool

HintType

Gets or sets the font type that shall be used to format any ambiguous characters.

public FontHintType HintType { get; set; }

Property Value

FontHintType

Remarks

There are certain characters that are not explicitly stored in the document, and can be mapped into multiple categories of the four mentioned above. This property shall be used to arbitrate that conflict, and determine how ambiguities shall be handled. This is primarily used to handle the formatting on the paragraph mark glyph, and other characters that are not stored as text.

Italic

Gets or sets a value indicating whether the font is formatted as italic.

In an Office Math zone this property takes into account the GrapeCity.Documents.Word.OMathFormat.Style property.

public bool Italic { get; set; }

Property Value

bool

ItalicBi

Gets or sets a value indicating whether Italic shall be applied to all complex script characters in the contents when displayed in a document.

In an Office Math zone this property takes into account the GrapeCity.Documents.Word.OMathFormat.Style property.

public bool ItalicBi { get; set; }

Property Value

bool

Kerning

Gets or sets the font size at which kerning starts.

public float Kerning { get; set; }

Property Value

float

LocaleName

Gets or sets the locale name (language) of the formatted characters.

public string LocaleName { get; set; }

Property Value

string

LocaleNameBi

Gets or sets the locale name (language) of the complex script characters.

public string LocaleNameBi { get; set; }

Property Value

string

LocaleNameFarEast

Gets or sets the locale name (language) of the formatted Asian characters.

public string LocaleNameFarEast { get; set; }

Property Value

string

Name

Gets or sets the name of the font.

When getting, returns NameAscii by default. If HintType is ComplexScript returns NameBi. If HintType is EastAsia returns NameFarEast.

When setting, sets NameAscii, NameBi, NameFarEast and NameOther to the specified value.

In an Office Math zone this property takes into account the Font property.

public string Name { get; set; }

Property Value

string

NameAscii

Gets or sets the font used for Latin text (characters with character codes from 0 (zero) through 127).

In an Office Math zone this property takes into account the Font property.

public string NameAscii { get; set; }

Property Value

string

NameBi

Gets or sets the name of the font used for complex script characters.

In an Office Math zone this property takes into account the Font property.

public string NameBi { get; set; }

Property Value

string

NameFarEast

Gets or sets an East Asian font name.

In an Office Math zone this property takes into account the Font property.

public string NameFarEast { get; set; }

Property Value

string

NameOther

Gets or sets the font used for characters with character codes from 128 through 255.

In an Office Math zone this property takes into account the Font property.

public string NameOther { get; set; }

Property Value

string

NoProofing

Gets or sets a value indicating whether the formatted characters are not to be spell checked.

public bool NoProofing { get; set; }

Property Value

bool

Outline

Gets or sets a value indicating whether the font is formatted as outline.

public bool Outline { get; set; }

Property Value

bool

Position

Gets or sets the position of text (in points) relative to the base line. A positive number raises the text, and a negative number lowers it.

public float Position { get; set; }

Property Value

float

Scaling

Gets or sets the character width scaling in percent.

public int Scaling { get; set; }

Property Value

int

Shading

Gets the Shading object that refers to the shading formatting for the font.

public Shading Shading { get; }

Property Value

Shading

Shadow

Gets or sets a value indicating whether the font is formatted as shadowed.

public bool Shadow { get; set; }

Property Value

bool

Size

Gets or sets the font size in points.

public float Size { get; set; }

Property Value

float

SizeBi

Gets or sets the font size in points used for all complex script characters in the contents when displayed in a document.

public float SizeBi { get; set; }

Property Value

float

SmallCaps

Gets or sets a value indicating whether the font is formatted as small capital letters.

public bool SmallCaps { get; set; }

Property Value

bool

Spacing

Gets or sets the spacing (in points) between characters.

public float Spacing { get; set; }

Property Value

float

StrikeThrough

Gets or sets a value indicating whether the font is formatted as strikethrough text.

public bool StrikeThrough { get; set; }

Property Value

bool

ThemeAscii

Gets or sets a theme font that shall be used to format all characters in the Unicode range (U+0000U+007F) within the parent. This theme font is a reference to one of the predefined theme fonts, which allows for font information to be set centrally in the document.

public ThemeFontType ThemeAscii { get; set; }

Property Value

ThemeFontType

ThemeBi

Gets or sets a theme font that shall be used to format all characters in a complex script Unicode range. This theme font is a reference to one of the predefined theme fonts, which allows for font information to be set centrally in the document.

public ThemeFontType ThemeBi { get; set; }

Property Value

ThemeFontType

ThemeFarEast

Gets or sets a theme font that shall be used to format all characters in an East Asian Unicode range. This theme font is a reference to one of the predefined theme fonts, which allows for font information to be set centrally in the document.

public ThemeFontType ThemeFarEast { get; set; }

Property Value

ThemeFontType

ThemeOther

Gets or sets a theme font that shall be used to format all characters in a Unicode range that does not fall into one of the three categories defined above. This theme font is a reference to one of the predefined theme fonts, which allows for font information to be set centrally in the document.

public ThemeFontType ThemeOther { get; set; }

Property Value

ThemeFontType

Underline

Gets or sets the type of underline applied to the font.

public Underline Underline { get; set; }

Property Value

Underline

UnderlineColor

Gets the color of the underline applied to the font.

public WordColor UnderlineColor { get; }

Property Value

WordColor

VerticalPosition

Gets or sets the alignment that shall be applied to the contents in relation to the default appearance of the text. This allows the text to be repositioned as subscript or superscript without altering the font size.

public VerticalTextPosition VerticalPosition { get; set; }

Property Value

VerticalTextPosition

WebHidden

Gets or sets a value indicating whether the contents shall be hidden in a document when the document is being displayed in a web page view.

public bool WebHidden { get; set; }

Property Value

bool

Remarks

The setting should affect the normal display of text in a web page view, but an application can have settings to force hidden text to be displayed. As well, this setting should not affect a normal paginated view of the document.

Methods

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.