New to Telerik UI for WinFormsStart a free 30-day trial

Immutable descriptor for font characteristics including family, size, weight, style, color, and underline used in cell formatting.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public struct FontProperties : IFontProperties

Implements: IFontProperties

Inherited Members ValueType.ToString()

Constructors

Initializes a new FontProperties with the specified family, size, and weight.

C#
public FontProperties(FontFamily fontFamily, double fontSize, bool isBold)
Parameters:fontFamilyFontFamily

The font family.

fontSizedouble

Size of the font.

isBoldbool

The value indicating whether the font is bold.

Properties

Gets the typeface family name used to render text.

C#
public readonly FontFamily FontFamily { get; }
Property Value:

The font family.

Implements: IFontProperties.FontFamily

Gets the font size in points.

C#
public readonly double FontSize { get; }
Property Value:

The size of the font.

Implements: IFontProperties.FontSize

Gets the platform-specific font style derived from IsItalic.

C#
public FontStyle FontStyle { get; }
Property Value:

The font style.

Implements: IFontProperties.FontStyle

Gets the platform-specific font weight derived from IsBold.

C#
public FontWeight FontWeight { get; }
Property Value:

The font weight.

Implements: IFontProperties.FontWeight

Gets the text color, which may reference a theme color or an explicit RGB value.

C#
public readonly ThemableColor ForeColor { get; }
Property Value:

The font color.

Implements: IFontProperties.ForeColor

Gets whether the font uses bold weight.

C#
public readonly bool IsBold { get; }
Property Value:

The value indicating whether the font is bold.

Implements: IFontProperties.IsBold

Gets whether the font uses italic style.

C#
public readonly bool IsItalic { get; }
Property Value:

The value indicating whether the font is italic.

Implements: IFontProperties.IsItalic

Gets or sets whether the font is monospaced (fixed-width), determined by font family or explicit override.

C#
public bool IsMonospaced { get; set; }
Property Value:

The value indicating whether the text is monospaced.

Implements: IFontProperties.IsMonospaced

Gets whether the font uses strikethrough decoration.

C#
public readonly bool IsStrikethrough { get; }
Property Value:

The value indicating whether the font is strikethrough.

Implements: IFontProperties.IsStrikethrough

Gets the underline style applied to text (None, Single, Double, etc.).

C#
public readonly UnderlineType Underline { get; }
Property Value:

The underline.

Implements: IFontProperties.Underline

Gets the vertical text alignment (none, superscript, or subscript) applied to the font.

C#
public readonly VerticalTextAlignment VerticalTextAlignment { get; }
Property Value:

The vertical text alignment.

Implements: IFontProperties.VerticalTextAlignment

Methods

Determines whether the specified object is equal to the current object.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with the current object.

Returns:

bool

True if the specified object is equal to the current object; otherwise, false.

Overrides: ValueType.Equals(object)

Serves as a hash function for a particular type.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: ValueType.GetHashCode()

Operators

Implements the not equals operator.

C#
public static bool operator !=(FontProperties left, FontProperties right)
Parameters:leftFontProperties

The left value.

rightFontProperties

The right value.

Returns:

bool

The result of the operator.

Implements the equals operator.

C#
public static bool operator ==(FontProperties left, FontProperties right)
Parameters:leftFontProperties

The left value.

rightFontProperties

The right value.

Returns:

bool

The result of the operator.