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