Struct
FontWeight

Refers to the density of a typeface, in terms of the lightness or heaviness of the strokes.

Definition

Namespace:Telerik.WinControls.RichTextEditor.UI

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

cs-api-definition
[TypeConverter(typeof(FontWeightConverter))]
public struct FontWeight : IFormattable

Implements: IFormattable

Methods

Compare(FontWeight, FontWeight)

Compares two instances of FontWeight.

Declaration

cs-api-definition
public static int Compare(FontWeight left, FontWeight right)

Parameters

left

FontWeight

The first FontWeight object to compare.

right

FontWeight

The second FontWeight object to compare.

Returns

int

An int value that indicates the relationship between the two instances of FontWeight. When the return value is less than zero, left is less than right. When this value is zero, it indicates that both operands are equal. When the value is greater than zero, it indicates that left is greater than right.

Equals(FontWeight)

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

Declaration

cs-api-definition
public bool Equals(FontWeight obj)

Parameters

obj

FontWeight

The instance of FontWeight to compare for equality.

Returns

bool

true if the two instances are equal; otherwise, false.

Equals(object)

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

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

The object to compare for equality.

Returns

bool

true if the two instances are equal; otherwise, false.

Overrides ValueType.Equals(object)

FromOpenTypeWeight(int)

Creates a new instance of FontWeight that corresponds to the OpenType usWeightClass value.

Declaration

cs-api-definition
public static FontWeight FromOpenTypeWeight(int weightValue)

Parameters

weightValue

int

An integer value between 1 and 999 that corresponds to the usWeightClass definition in the OpenType specification.

Returns

FontWeight

A new instance of FontWeight.

GetHashCode()

Retrieves the hash code for this object.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A 32-bit hash code, which is a signed integer.

Overrides ValueType.GetHashCode()

ToOpenTypeWeight()

Returns a value that represents the OpenType usWeightClass for the FontWeight object.

Declaration

cs-api-definition
public int ToOpenTypeWeight()

Returns

int

An integer value between 1 and 999 that corresponds to the usWeightClass definition in the OpenType specification.

ToString()

Returns a text string that represents the value of the FontWeight object and is based on the CurrentCulture property information.

Declaration

cs-api-definition
public override string ToString()

Returns

string

A string that represents the value of the FontWeight object, such as "Light", "Normal", or "UltraBold".

Overrides ValueType.ToString()

Operators

operator !=(FontWeight, FontWeight)

Evaluates two instances of FontWeight to determine inequality.

Declaration

cs-api-definition
public static bool operator !=(FontWeight left, FontWeight right)

Parameters

left

FontWeight

The first instance of FontWeight to compare.

right

FontWeight

The second instance of FontWeight to compare.

Returns

bool

false if left is equal to right; otherwise, true.

operator <(FontWeight, FontWeight)

Evaluates two instances of FontWeight to determine whether one instance is less than the other.

Declaration

cs-api-definition
public static bool operator <(FontWeight left, FontWeight right)

Parameters

left

FontWeight

The first instance of FontWeight to compare.

right

FontWeight

The second instance of FontWeight to compare.

Returns

bool

true if left is less than right; otherwise, false.

operator <=(FontWeight, FontWeight)

Evaluates two instances of FontWeight to determine whether one instance is less than or equal to the other.

Declaration

cs-api-definition
public static bool operator <=(FontWeight left, FontWeight right)

Parameters

left

FontWeight

The first instance of FontWeight to compare.

right

FontWeight

The second instance of FontWeight to compare.

Returns

bool

true if left is less than or equal to right; otherwise, false.

operator ==(FontWeight, FontWeight)

Compares two instances of FontWeight for equality.

Declaration

cs-api-definition
public static bool operator ==(FontWeight left, FontWeight right)

Parameters

left

FontWeight

The first instance of FontWeight to compare.

right

FontWeight

The second instance of FontWeight to compare.

Returns

bool

true if the instances of FontWeight are equal; otherwise, false.

operator >(FontWeight, FontWeight)

Evaluates two instances of FontWeight to determine whether one instance is greater than the other.

Declaration

cs-api-definition
public static bool operator >(FontWeight left, FontWeight right)

Parameters

left

FontWeight

The first instance of FontWeight to compare.

right

FontWeight

The second instance of FontWeight to compare.

Returns

bool

true if left is greater than right; otherwise, false.

operator >=(FontWeight, FontWeight)

Evaluates two instances of FontWeight to determine whether one instance is greater than or equal to the other.

Declaration

cs-api-definition
public static bool operator >=(FontWeight left, FontWeight right)

Parameters

left

FontWeight

The first instance of FontWeight to compare.

right

FontWeight

The second instance of FontWeight to compare.

Returns

bool

true if left is greater than or equal to right; otherwise, false.