StructFontWeight
Represents the numeric thickness of a font face (e.g., 100–900) used to choose weight during text layout.
Definition
Namespace:Telerik.Documents.Core.Fonts
Assembly:Telerik.Windows.Documents.Core.dll
Syntax:
public struct FontWeight
Constructors
FontWeight(int)
Create a new weight from its numeric value.
Methods
Equals(object)
Determines whether the specified object is equal to the current FontWeight.
Declaration
public override bool Equals(object obj)
Parameters
obj
The object to compare with the current instance.
Returns
True if the specified object is a FontWeight with the same numeric value; otherwise, false.
Overrides
GetHashCode()
Returns a hash code for the current FontWeight.
Declaration
public override int GetHashCode()
Returns
A hash code derived from the underlying numeric weight, suitable for use in hashing algorithms and data structures.
Overrides
ToString()
Returns a string that represents the current FontWeight. When possible, a human-readable name is returned (for example, "Bold"); otherwise the numeric value.
Operators
operator !=(FontWeight, FontWeight)
Determine whether two weights differ.
Declaration
public static bool operator !=(FontWeight fw1, FontWeight fw2)
Parameters
fw1
First object to compare.
fw2
Second object to compare.
Returns
Returns false when the font weight values are equal for both objects, and true otherwise.
operator <(FontWeight, FontWeight)
Test whether the left weight is lighter than the right.
Declaration
public static bool operator <(FontWeight fw1, FontWeight fw2)
Parameters
fw1
First object to compare.
fw2
Second object to compare.
Returns
operator <=(FontWeight, FontWeight)
Test whether the left weight is lighter than or equal to the right.
Declaration
public static bool operator <=(FontWeight fw1, FontWeight fw2)
Parameters
fw1
First object to compare.
fw2
Second object to compare.
Returns
operator ==(FontWeight, FontWeight)
Compare two weights for value equality.
Declaration
public static bool operator ==(FontWeight fw1, FontWeight fw2)
Parameters
fw1
First object to compare.
fw2
Second object to compare.
Returns
Returns true when the font weight values are equal for both objects, and false otherwise.
operator >(FontWeight, FontWeight)
Test whether the left weight is heavier than the right.
Declaration
public static bool operator >(FontWeight fw1, FontWeight fw2)
Parameters
fw1
First object to compare.
fw2
Second object to compare.
Returns
operator >=(FontWeight, FontWeight)
Test whether the left weight is heavier than or equal to the right.
Declaration
public static bool operator >=(FontWeight fw1, FontWeight fw2)
Parameters
fw1
First object to compare.
fw2
Second object to compare.
Returns